specialDates property
In the month view of SfDateRangePicker highlights the unique dates with different style rather than the other dates style.
Defaults to null.
Use DateRangePickerMonthCellStyle.specialDatesTextStyle or DateRangePickerMonthCellStyle.specialDatesDecoration property to customize the appearance of blackout dates in month view.
See also: DateRangePickerMonthCellStyle.specialDatesTextStyle,which used to set text style for the text in special dates cell in the month view. DateRangePickerMonthCellStyle.specialDatesDecoration, which used to set decoration for the special dates cell in the month view.
- blackoutDates, which is the list of dates to restrict the interaction for specific dates in month view.
- Knowledge base: How to customize the special dates using builder
- Knowledge base: How to apply theming
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfDateRangePicker(
controller: _pickerController,
view: DateRangePickerView.month,
selectionMode: DateRangePickerSelectionMode.range,
monthViewSettings:
DateRangePickerMonthViewSettings(specialDates: <DateTime>[
DateTime.now().add(Duration(days: 2)),
DateTime.now().add(Duration(days: 3)),
DateTime.now().add(Duration(days: 6)),
DateTime.now().add(Duration(days: 7))
]),
),
),
);
}
Implementation
final List<DateTime>? specialDates;