DateRangeInput Blazor API

DateRangeInput Properties

NameTypeDefaultDescription
DateFormatDateRangeFormat{"day": "numeric", "month": "numeric", "year": "numeric" }Determines the format of the dates displayed in the input. Accepts valid ECMAScript Internationalization API format. By default the date format is determined by the 'locale' property. Intl.DateTimeFormat is used to format date strings in JavaScript
DisabledboolfalseEnables or disables the element.
DropDownButtonPositionDropDownButtonPositionDropDownButtonPosition.RightDetermines the position of the drop down button.
DropDownHeightobjectSets the height of the drop down. By default it's set to an empty string. In this case the height of the drop down is controlled by a CSS variable.
DropDownWidthobjectSets the width of the drop down. By default it's set to an empty string. In this case the width of the drop down is controlled by a CSS variable.
IconsboolfalseDetermines whether the 'Today/Clear' icons will be visible or not.
InputPurposestring"off"Sets the purpose of the input and what, if any, permission the user agent has to provide automated assistance in filling out the element's input when in a form, as well as guidance to the browser as to the type of information expected in the element. This value corresponds to the standard HTML autocomplete attribute and can be set to values such as 'on', 'name', 'organization', 'street-address', etc.
Localestring"en"Sets or gets the language. Used in conjunction with the property messages.
Maxobjectnew Date(2100, 1, 1)Determines the max date for the Calendar displayed inside the popup.
MessagesobjectN/ASets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
Minobjectnew Date(1900, 1, 1)Determines the min date for the Calendar displayed inside the popup.
Monthsint1Determines the number of months that will be displayed inside the popup.
Namestring""Sets or gets the name attribute for the element. Name is used when submiting data inside an HTML form.
IsOpenedboolfalseDetermines whether the drop down is opened or not.
Placeholderstring""Determines the placeholder of the input.
ReadonlyboolfalseDetermines whether ot not the user can enter text inside the input. if dropDownButtonPosition is set to 'left' or 'right' then readonly determines whether the element acts as a ComboBox or a DropDownList if a dataSource is provided.
RightToLeftboolfalseSets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
Separatorstring" - "Determines the delimiter between the selected dates in the input. This delimiter is ued to distinguish the starting date from the ending date.
TimeFormatTimeRangeFormat{ hour: '2-digit', minute: '2-digit' }Determines the format of the dates displayed in the input. Accepts valid ECMAScript Internationalization API format. By default the date foramt is determined by the 'locale' property.
TimepickerboolfalseDetermines whether time selection is available or not.
Themestring""Determines the theme for the element. Themes define the look of the elements.
UnfocusableboolfalseIf is set to true, the element cannot be focused.
ValueobjectSets or gets the value of the element. The type of the value depends on the valueType property.
ValueTypeDateRangeInputValueTypeDateRangeInputValueType.StringDetermines the value type returned from the `value` property.

DateRangeInput Methods

NameTypeArgumentsDescription
ClosevoidN/ACloses the drop down.
GetIsOpenedAsync()Task<bool>'N/A'Gets the &quot;IsOpened&quot; property as Task&lt;bool&gt;.
GetValueAsync()Task<object>'N/A'Gets the &quot;Value&quot; property as Task&lt;object&gt;.
OpenvoidN/AOpens the drop down.
Refreshvoid'N/A'Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements.
Rendervoid'N/A'Re-renders the Blazor Component. This method will make a full re-render.
SelectvoidN/ASelects the text inside the input or if it is <b>readonly</b> then the element is focused.
StateHasChangedvoid'N/A'Refreshes the state and Re-renders the Blazor Component, if necessary.

DateRangeInput Events

NameTypeDescriptionEvent Detail
OnChangeEventCallback<Event>This event is triggered when the selection is changed.string label- The label of the new selected item., dynamic oldLabel- The label of the item that was previously selected before the event was triggered., dynamic oldValue- The value of the item that was previously selected before the event was triggered., dynamic value- The value of the new selected item.
Changedevent DateRangeInputChangedEventHandlerThis event is triggered when the selection is changed.DateRangeInputChangedEventArgs

Enums

DateRangeFormatDay

DateRangeFormatDay.Numeric
DateRangeFormatDay.TwoDigit

DateRangeFormatMonth

DateRangeFormatMonth.Numeric
DateRangeFormatMonth.TwoDigit
DateRangeFormatMonth.Narrow
DateRangeFormatMonth.Short
DateRangeFormatMonth.Long

DateRangeFormatYear

DateRangeFormatYear.Numeric
DateRangeFormatYear.TwoDigit
DropDownButtonPosition.None
DropDownButtonPosition.Left
DropDownButtonPosition.Right

TimeRangeFormatHour

TimeRangeFormatHour.Numeric
TimeRangeFormatHour.TwoDigit

TimeRangeFormatMinute

TimeRangeFormatMinute.Numeric
TimeRangeFormatMinute.TwoDigit

DateRangeInputValueType

DateRangeInputValueType.String
DateRangeInputValueType.Object

DateRangeFormat Properties

NameTypeDefaultDescription
DayDateRangeFormatDayDateRangeFormatDay.NumericDay format.
MonthDateRangeFormatMonthDateRangeFormatMonth.NumericMonth format.
YearDateRangeFormatYearDateRangeFormatYear.NumericYear format.

TimeRangeFormat Properties

NameTypeDefaultDescription
HourTimeRangeFormatHourTimeRangeFormatHour.TwoDigitHour format.
MinuteTimeRangeFormatMinuteTimeRangeFormatMinute.TwoDigitMinute format.