specialDates property
In the month view of SfHijriDateRangePicker highlights the unique dates with different style rather than the other dates style.
Defaults to null.
Use HijriDatePickerMonthCellStyle.specialDatesTextStyle or HijriDatePickerMonthCellStyle.specialDatesDecoration property to customize the appearance of blackout dates in month view.
See also: HijriDatePickerMonthCellStyle.specialDatesTextStyle,which used to set text style for the text in special dates cell in the month view. HijriDatePickerMonthCellStyle.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: SfHijriDateRangePicker(
controller: _pickerController,
view: HijriDatePickerView.month,
selectionMode: DateRangePickerSelectionMode.range,
monthViewSettings:
HijriDatePickerMonthViewSettings(
specialDates: <HijriDateTime>[
HijriDateTime.now().add(Duration(days: 2)),
HijriDateTime.now().add(Duration(days: 3)),
HijriDateTime.now().add(Duration(days: 6)),
HijriDateTime.now().add(Duration(days: 7))
]),
),
),
);
}
Implementation
final List<HijriDateTime>? specialDates;