public sealed class CalendarA month of days to choose one from.
Remarks
The first half of doc 49 § 7.1's rank 5, and the half a date picker is made of. Always six weeks of seven days, the days either side of the month drawn and marked .outside — so the grid is the same height in February as in August, on Pagination's argument that a control whose size moves as you page through it moves the thing you were about to click.
⚠ The week starts where the culture says it does, and the names are the culture's. Culture decides the first day of the week, the weekday headings, the month title and every cell's spoken date. null is the invariant culture — Sunday first, English names — on Culture's terms: a control that quietly followed the thread's culture would change what every calendar prints on a machine setting nobody in the application chose.
⚠ ARIA's date-picker grid, keyboard included. One day is the tab stop — the chosen one, or today's — and the arrows move it: a day either way, a week up and down, Home and End to the ends of the week, Page Up and Page Down a month, and with Shift a year. Moving onto a day of another month shows that month, so the focus never leaves the grid. Enter and Space choose, as a click does.
Two nodes in the tree: a group round the whole calendar and a grid round the days, both named by the month title through LabelledBy, so a reader entering the grid hears "September 2026" and then the day. The weekday headings are columnheaders whose names are the full day names; the cells show the shortest.
Fields and properties (18)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
protected override bool AcceptsFocusprotected override AccessibleRole NativeRoleThe role this kind of element has when nobody says otherwise.
public UiElement HeaderThe row across the top: the two arrows and the month between them.
public UiElement TitleThe month and year being shown, which names the calendar and its grid.
public IconButton PreviousThe arrow that shows the month before.
public IconButton NextThe arrow that shows the month after.
public UiElement GridThe weekday headings and the six weeks under them.
public IReadOnlyList<CalendarDay> DaysThe forty-two days on show, a week at a time from the top left.
public DateOnly? Valuepublic DateOnly? Minimumpublic DateOnly? Maximumpublic DateOnly MonthThe month on show, as its first day.
public DateOnly TodayWhich day is marked as today.
public CultureInfo? CultureWhich locale's week, names and date formats the calendar uses. null is invariant.
public static readonly UiPropertyKey ValuePropertyIdentity for Value.
public static readonly UiPropertyKey MinimumPropertyIdentity for Minimum.
public static readonly UiPropertyKey MaximumPropertyIdentity for Maximum.
Events (1)
public Action<Calendar, DateOnly?>? ValueChangedRaised when the chosen date changes.
Methods (5)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
public CalendarDay? DayOf(DateOnly date)The cell showing a date, if it is on show.
public void ClearValue()Unsets Value, so it takes its default or its ancestor's value again.
public void ClearMinimum()Unsets Minimum, so it takes its default or its ancestor's value again.
public void ClearMaximum()Unsets Maximum, so it takes its default or its ancestor's value again.
Used by (3)
- CalendarTestsVixen.Ui.Controls.Tests
- DatePickerVixen.Ui.Controls
- DatePickerTestsVixen.Ui.Controls.Tests