minDate property
The minimum date as much as the SfDateRangePicker will navigate.
The SfDateRangePicker widget will navigate as minimum as to the given date, and the dates before that date will be disabled for interaction and navigation to those dates were restricted.
Defaults to 1st January of 1900
.
Note: If the initialDisplayDate or controller.displayDate
property
set with the date prior to this date, the SfDateRangePicker will take
this min date as a display date and render dates based on the date set to
this property.
See also:
- initialDisplayDate, which used to navigate the date range picker to the specific date on initially.
- maxDate, which is last available date for the date range picker.
controller.displayDate
, which used to navigate the date range picker to specific date on dynamically.- enablePastDates, which allows to enable the dates that falls before the today date for interaction.
- 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,
minDate: DateTime(2020, 01, 01),
),
),
);
}
Implementation
final DateTime minDate;