selectableDayPredicate property

HijriDatePickerSelectableDayPredicate? selectableDayPredicate
final

An selectableDayPredicate callback to decide whether the cell is selectable or not in hijri date range picker.

Note: This callback is not applicable when the navigationMode set as DateRangePickerNavigationMode.scroll.

Defaults to null.

See also: HijriDatePickerMonthViewSettings.blackoutDates, which allows to disable interaction for specific dates.


@override
Widget build(BuildContext context) {
  return MaterialApp(
      home: Scaffold(
        body: SfHijriDateRangePicker(
          initialDisplayDate: HijriDateTime(1442, 1, 1),
          selectableDayPredicate: (HijriDateTime dateTime) {
            if (dateTime != HijriDateTime(1442, 1, 1)) {
              return false;
            }
            return true;
          },
        ),
      ));
}

Implementation

final HijriDatePickerSelectableDayPredicate? selectableDayPredicate;