Class IgbDatePicker
igc-date-picker is a feature rich component used for entering a date through manual text input or
choosing date values from a calendar dialog that pops up.
Inheritance
System.Object
IgbDatePicker
Implements
System.IDisposable
Assembly: IgniteUI.Blazor.dll
Syntax
public class IgbDatePicker : IgbBaseComboBoxLike, RefSink, JsonSerializable, IDisposable
Constructors
IgbDatePicker()
Declaration
Properties
ActiveDate
Gets/Sets the date which is shown in the calendar picker and is highlighted.
By default it is the current date.
Declaration
public DateTime ActiveDate { get; set; }
Property Value
| Type |
Description |
| System.DateTime |
|
Change
Declaration
public EventCallback<IgbComponentDateValueChangedEventArgs> Change { get; set; }
Property Value
ChangeScript
Declaration
public string ChangeScript { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Closed
Declaration
public EventCallback<IgbVoidEventArgs> Closed { get; set; }
Property Value
| Type |
Description |
| Microsoft.AspNetCore.Components.EventCallback<IgbVoidEventArgs> |
|
ClosedScript
Declaration
public string ClosedScript { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Closing
Declaration
public EventCallback<IgbVoidEventArgs> Closing { get; set; }
Property Value
| Type |
Description |
| Microsoft.AspNetCore.Components.EventCallback<IgbVoidEventArgs> |
|
ClosingScript
Declaration
public string ClosingScript { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Disabled
The disabled state of the component
Declaration
public bool Disabled { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
DisabledDates
Gets/sets disabled dates.
Declaration
public IgbDateRangeDescriptor[] DisabledDates { get; set; }
Property Value
Format to display the value in when not editing.
Defaults to the locale format if not set.
Declaration
public string DisplayFormat { get; set; }
Property Value
| Type |
Description |
| System.String |
|
The orientation of the calendar header.
Declaration
public CalendarHeaderOrientation HeaderOrientation { get; set; }
Property Value
Determines whether the calendar hides its header.
Declaration
public bool HideHeader { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
HideOutsideDays
Controls the visibility of the dates that do not belong to the current month.
Declaration
public bool HideOutsideDays { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Declaration
public EventCallback<IgbComponentDateValueChangedEventArgs> Input { get; set; }
Property Value
The date format to apply on the input.
Defaults to the current locale Intl.DateTimeFormat
Declaration
public string InputFormat { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Declaration
public string InputScript { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Invalid
Control the validity of the control.
Declaration
public bool Invalid { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Label
The label of the datepicker.
Declaration
public string Label { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Locale
Gets/Sets the locale used for formatting the display value.
Declaration
public string Locale { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Max
The maximum value required for the date picker to remain valid.
Declaration
public Nullable<DateTime> Max { get; set; }
Property Value
| Type |
Description |
| System.Nullable<System.DateTime> |
|
Min
The minimum value required for the date picker to remain valid.
Declaration
public Nullable<DateTime> Min { get; set; }
Property Value
| Type |
Description |
| System.Nullable<System.DateTime> |
|
Mode
Determines whether the calendar is opened in a dropdown or a modal dialog
Declaration
public PickerMode Mode { get; set; }
Property Value
NonEditable
Whether to allow typing in the input.
Declaration
public bool NonEditable { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Opened
Declaration
public EventCallback<IgbVoidEventArgs> Opened { get; set; }
Property Value
| Type |
Description |
| Microsoft.AspNetCore.Components.EventCallback<IgbVoidEventArgs> |
|
OpenedScript
Declaration
public string OpenedScript { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Opening
Declaration
public EventCallback<IgbVoidEventArgs> Opening { get; set; }
Property Value
| Type |
Description |
| Microsoft.AspNetCore.Components.EventCallback<IgbVoidEventArgs> |
|
OpeningScript
Declaration
public string OpeningScript { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Orientation
The orientation of the multiple months displayed in the calendar's days view.
Declaration
public ContentOrientation Orientation { get; set; }
Property Value
Outlined
Whether the control will have outlined appearance.
Declaration
public bool Outlined { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Placeholder
The placeholder attribute of the control.
Declaration
public string Placeholder { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Prompt
The prompt symbol to use for unfilled parts of the mask.
Declaration
public string Prompt { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ReadOnly
Makes the control a readonly field.
Declaration
[WCAttributeName("readonly")]
public bool ReadOnly { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Required
Makes the control a required field in a form context.
Declaration
public bool Required { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
ResourceStrings
The resource strings for localization.
Declaration
public IgbCalendarResourceStrings ResourceStrings { get; set; }
Property Value
ShowWeekNumbers
Whether to show the number of the week in the calendar.
Declaration
public bool ShowWeekNumbers { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
SpecialDates
Declaration
public IgbDateRangeDescriptor[] SpecialDates { get; set; }
Property Value
SupportsVisualChildren
Declaration
protected override bool SupportsVisualChildren { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
Type
Declaration
public override string Type { get; }
Property Value
| Type |
Description |
| System.String |
|
Overrides
Value
Declaration
public Nullable<DateTime> Value { get; set; }
Property Value
| Type |
Description |
| System.Nullable<System.DateTime> |
|
ValueChanged
Declaration
public EventCallback<Nullable<DateTime>> ValueChanged { get; set; }
Property Value
| Type |
Description |
| Microsoft.AspNetCore.Components.EventCallback<System.Nullable<System.DateTime>> |
|
VisibleMonths
The number of months displayed in the calendar.
Declaration
public double VisibleMonths { get; set; }
Property Value
| Type |
Description |
| System.Double |
|
WeekStart
Sets the start day of the week for the calendar.
Declaration
public WeekDays WeekStart { get; set; }
Property Value
Methods
CheckValidity()
Declaration
public void CheckValidity()
CheckValidityAsync()
Checks for validity of the control and emits the invalid event if it invalid.
Declaration
public Task CheckValidityAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Clear()
Declaration
ClearAsync()
Clears the input part of the component of any user input
Declaration
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
EnsureModulesLoaded()
Declaration
protected override void EnsureModulesLoaded()
Overrides
FindByName(String)
Declaration
public override object FindByName(string name)
Parameters
| Type |
Name |
Description |
| System.String |
name |
|
Returns
| Type |
Description |
| System.Object |
|
Overrides
GetCurrentValue()
Declaration
public Nullable<DateTime> GetCurrentValue()
Returns
| Type |
Description |
| System.Nullable<System.DateTime> |
|
GetCurrentValueAsync()
Declaration
public Task<Nullable<DateTime>> GetCurrentValueAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Nullable<System.DateTime>> |
|
ReportValidity()
Declaration
public void ReportValidity()
ReportValidityAsync()
Checks for validity of the control and shows the browser message if it invalid.
Declaration
public Task ReportValidityAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
ResolveDisplay()
Declaration
protected override string ResolveDisplay()
Returns
| Type |
Description |
| System.String |
|
Overrides
Select()
Declaration
SelectAsync()
Selects the text in the input of the component
Declaration
public Task SelectAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
SetCustomValidity(String)
Declaration
public void SetCustomValidity(string message)
Parameters
| Type |
Name |
Description |
| System.String |
message |
|
SetCustomValidityAsync(String)
Sets a custom validation message for the control.
As long as message is not empty, the control is considered invalid.
Declaration
public Task SetCustomValidityAsync(string message)
Parameters
| Type |
Name |
Description |
| System.String |
message |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
StepDown(Nullable<DatePart>, Double)
Declaration
public void StepDown(Nullable<DatePart> datePart = null, double delta = -1)
Parameters
| Type |
Name |
Description |
| System.Nullable<DatePart> |
datePart |
|
| System.Double |
delta |
|
StepDownAsync(Nullable<DatePart>, Double)
Declaration
public Task StepDownAsync(Nullable<DatePart> datePart = null, double delta = -1)
Parameters
| Type |
Name |
Description |
| System.Nullable<DatePart> |
datePart |
|
| System.Double |
delta |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
StepUp(Nullable<DatePart>, Double)
Declaration
public void StepUp(Nullable<DatePart> datePart = null, double delta = -1)
Parameters
| Type |
Name |
Description |
| System.Nullable<DatePart> |
datePart |
|
| System.Double |
delta |
|
StepUpAsync(Nullable<DatePart>, Double)
Declaration
public Task StepUpAsync(Nullable<DatePart> datePart = null, double delta = -1)
Parameters
| Type |
Name |
Description |
| System.Nullable<DatePart> |
datePart |
|
| System.Double |
delta |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Implements
System.IDisposable