Skip to main content

waft_widgets/widgets/
date.rs

1//! Flutter counterpart: `widgets/date.dart`.
2
3use std::rc::Rc;
4
5use waft_foundation::{App, DateTime};
6
7/// Signature for predicating dates for enabled date selections.
8///
9/// See `showDatePicker` and `showCupertinoModalPopup`, which have a
10/// [`SelectableDayPredicate`] parameter used to specify allowable days in the date picker. It
11/// takes the [`App`], whose platform gives the local time zone the day's fields are read in.
12pub type SelectableDayPredicate = Rc<dyn Fn(&App, DateTime) -> bool>;