DateRangePicker
Description
A composite picker for selecting a contiguous range of dates ("from" → "to"). Internally composed of two DatePicker instances joined by a visual separator. The two pickers stay in sync: setting the "from" date raises the "to" picker's minimum, and vice-versa.
Usage
API reference
public sealed class DateRangePicker : IComponent, IHasMarginPaddingA composite picker for selecting a contiguous range of dates ("from" → "to"). Internally composed of two instances joined by a visual separator. The two pickers stay in sync: setting the "from" date raises the "to" picker's minimum, and vice-versa.
Constructors
Properties
public DateTime? FromGets the currently selected "from" date, or if no date has been picked.
public DateTime? ToGets the currently selected "to" date, or if no date has been picked.
public DatePicker FromPickerGets the inner picker used for the "from" date. Useful for advanced configuration (min/max bounds, validation).
public DatePicker ToPickerGets the inner picker used for the "to" date. Useful for advanced configuration (min/max bounds, validation).
public string Margin { get ; set ; }Gets or sets the outer container's CSS margin.
Methods
public DateRangePicker SetFrom(DateTime date)Sets the "from" date programmatically.
public DateRangePicker SetTo(DateTime date)Sets the "to" date programmatically.
public DateRangePicker OnChange(Action<DateRangePicker> handler)Registers a callback fired whenever either the "from" or "to" date changes.
public DateRangePicker OnChange(Action<DateRangePicker, Event> handler)Registers a callback fired whenever either the "from" or "to" date changes. The two-argument overload mirrors the convention used elsewhere in the toolkit (sender + event args).