enablePastDates property
Allows to disable the dates falls before the today date in SfDateRangePicker.
If it is set as false
the dates falls before the today date is disabled
and selection interactions to that dates were restricted.
Defaults to true
.
See also:
- minDate, which is the least available date for the date range picker.
- maxDate, which is last available date for the date range picker.
- Knowledge base: How to enable or disable the past dates
- Knowledge base: How to restrict date range picker within the date limit
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfDateRangePicker(
view: DateRangePickerView.month,
enablePastDates: false,
),
),
);
}
Implementation
final bool enablePastDates;