blackoutDates property
Disables the interactions for certain dates in the month view of SfHijriDateRangePicker.
Defaults to null.
Use HijriDatePickerMonthCellStyle.blackoutDateTextStyle or HijriDatePickerMonthCellStyle.blackoutDatesDecoration property to customize the appearance of blackout dates in month view.
See also:
- HijriDatePickerMonthCellStyle.blackoutDateTextStyle, which used to set text style for the black out date cell in the month view.
- HijriDatePickerMonthCellStyle.blackoutDatesDecoration, which used to set the decoration for the black out date cell in the month view.
- specialDates, which is the list of dates to highlight the specific dates in the month view.
- weekendDays, which used to change the week end days in the month view.
- SfHijriDateRangePicker.enablePastDates, which allows to enable the dates that falls before the today date for interaction.
- Knowledge base: How to update blackout dates using onViewChanged callback
- Knowledge base: How to add active dates
- 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(
blackoutDates: <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>? blackoutDates;