pub fn date_picker() -> DatePickerBuilderExpand description
§date_picker
Render a calendar date picker for selecting a single date.
§Usage
Use when you need a calendar grid for picking a specific date.
§Parameters
modifier— modifier chain applied to the date picker.initial_selected_date— initial selected date for the internal state.initial_displayed_month— initial displayed month for the internal state.year_range— year range allowed in the internal state.is_selectable_date— optional date predicate for the internal state.Noneallows every date. A date is selectable only when the year range, the year predicate, and this predicate all allow it.is_selectable_year— optional year predicate for the internal state.Noneallows every year.display_mode— initial display mode for the internal state.first_day_of_week— first day of the week for the calendar grid.today— current date used for date and year outlines and initial keyboard focus; defaults to the system date.show_weekday_labels— whether weekday labels are rendered.show_mode_toggle— whether the display mode toggle is shown.title— optional override for the title text.headline— optional override for the headline text.state— optional external state for selection, month navigation, and mode.view— optional shared calendar or year selection view.focus_requester— requests focus on the calendar’s current keyboard date.
§Examples
use tessera_components::date_picker::{CalendarDate, DatePickerState, date_picker};
date_picker().today(CalendarDate::new(2026, 7, 16).unwrap());
let mut state = DatePickerState::default();
assert!(state.selected_date().is_none());