DateRangeField
Since 0.1.0-alpha.20IzzyBlazor.DateRangeField in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.20 assembly
and its doc comments.
Properties (22)
ReadOnlybool = falseMakes the field read-only: it can be focused, and it still posts.
MinDateOnly?The earliest day either end can be.
MaxDateOnly?The latest day either end can be.
MinDaysint?The fewest days a range can span, both ends counted.
MaxDaysint?The most days a range can span, both ends counted.
AllowDisabledInRangebool = falseLets a range span days that DateDisabled turns off, as a stay can span a day with no arrivals. Its ends still can't be those days.
UseNativebool = falseKeeps the browser's calendars in place of the library's months. DateDisabled, MinDays and MaxDays are then checked only on the server.
DisplayMonthsint = 2How many months show side by side, from 1 to 6. Defaults to 2. A phone shows one.
Clearablebool = falseA button in the field that empties both ends, there while it holds something. Off by default.
PresetsIReadOnlyList<DateRangePreset>?Ranges to choose in one click, beside the months, such as Common. They show with the months, so not with UseNative or no script.
ChooseLabelstring?The name of the months' button, in place of "Choose dates" and "Change dates" with both days.
StartTextstring?The caption of the first date, in place of "Start".
EndTextstring?The caption of the second date, in place of "End".
FirstDayOfWeekDayOfWeek? (computed)The first column. Defaults to the culture's first day of the week.
CultureCultureInfo? (computed)The culture for the month and day names, the first day and the week numbers. Defaults to the current culture.
ShowWeekNumbersbool = falseAdds a first column with the week of the year, counted as the culture counts them.
ShowAdjacentDaysbool = trueWhether to show the days of the months before and after, muted, in the first and last weeks. Defaults to true.
DateDisabledFunc<DateOnly, bool>?Whether a day can't be chosen. Checked on the server too, so it stops OnValidSubmit whatever was posted. It's called for every day in the window on every render, so keep it cheap.
DateDisabledWindowTimeSpan?How far each way from the value or today to call DateDisabled and DayClass, in whole days, for an end the limits don't set. About a year unless set. With DateDisabled, the month stops at the window's edge.
DayClassFunc<DateOnly, string?>?A class for a day's button, or null. Called like DateDisabled, so keep it cheap.
@bind-ValueDateRange?The value, bound with @bind-Value.
DisplayNamestring?The field's name in validation messages from the input itself, such as a value that can't be parsed.
Events (0)
No events.
Types (2)
DateRange
recordTwo whole days, both included, either of which may be open. It holds days rather than times, so midnight never enters it. The properties are settable for form binding on a static post.
| Member | Description |
|---|---|
Start DateOnly? | The first day, or null for no limit. |
End DateOnly? | The last day, included, or null for no limit. |
IsEmpty bool | Whether it has no ends, as a static post of an empty field can bind to. |
Days int? | How many days it spans, both ends counted, or null with an open end. |
Contains(DateOnly day) | Whether this day is in the range. |
Contains(DateTime time) | Whether this time's clock date is in the range. Any time on the last day counts. |
DateTimeOffset?> ToUtc(TimeZoneInfo zone) | The range as instants in UTC, for a query: |
DateRangePreset
recordA range to choose in one click, drawn beside a DateRangeField's months.
| Member | Description |
|---|---|
Label string | What the button says. |
Start DateOnly | Its first day. |
End DateOnly | Its last day, included. |