Skip to main content

Module datepicker

Module datepicker 

Source
Expand description

A month grid for browsing and choosing dates, and a segmented time entry, from datepicker.css. The grid ports upstream’s datepicker.ts.

The calendar is for browsing. Anyone who knows the date types it faster into a native <input type="date">, which is also the path with no script, so offer that input and open the calendar beside it rather than replacing it.

Re-exports§

pub use DatePicker_completions::Component::DatePicker;
pub use TimePicker_completions::Component::TimePicker;

Structs§

DateNames
The words a calendar shows. Rust has no locale data, so names come from the app; the default is English.
DatePickerProps
Properties for the DatePicker component.
Time
A time of day.
TimePickerProps
Properties for the TimePicker component.

Functions§

DatePicker
A month grid on the WAI-ARIA date grid pattern: one tab stop, arrows by day (swapped in RTL) and week, Home and End to the week’s ends, Page Up and Down by month (Shift for a year), Enter or Space to choose. Unavailable days stay focusable so they can be discovered, but cannot be chosen.
TimePicker
Hour and minute fields, with an AM/PM choice in twelve-hour mode. Each field takes digits only and clamps to its range when it loses focus.