blackoutDates property

List<DateTime>? blackoutDates
final

Disables the interactions for certain dates in the month view of SfDateRangePicker.

Defaults to null.

Use DateRangePickerMonthCellStyle.blackoutDateTextStyle or DateRangePickerMonthCellStyle.blackoutDatesDecoration property to customize the appearance of blackout dates in month view.

See also:


Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       body: SfDateRangePicker(
         controller: _pickerController,
         view: DateRangePickerView.month,
         selectionMode: DateRangePickerSelectionMode.range,
         monthViewSettings:
             DateRangePickerMonthViewSettings(blackoutDates: <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>? blackoutDates;