toggleDaySelection property
Allows to deselect a date when the DateRangePickerSelectionMode set as DateRangePickerSelectionMode.single.
When this toggleDaySelection property set as true
tapping on a single
date for the second time will clear the selection, which means setting
this property as true
allows to deselect a date when the
DateRangePickerSelectionMode set as single.
Defaults to false
.
See also:
- selectionMode, which allows to set different selection modes for hijri date range picker.
- selectionShape, which allows to customize the shape of the selection view in hijri date range picker.
- onSelectionChanged, callback which notifies whenever the selection changed on hijri date range picker.
- selectionRadius, which is the radius for the selection view in the hijri date range picker when the selection shape set as DateRangePickerSelectionShape.circle.
- initialSelectedDate, which allows to select date programmatically initially on hijri date range picker.
- HijriDatePickerController.selectedDate,which allows to select date programmatically dynamically on hijri date range picker.
- Knowledge base: How to deselect the selected date
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfHijriDateRangePicker(
view: HijriDatePickerView.month,
selectionMode: DateRangePickerSelectionMode.single,
toggleDaySelection: true,
),
),
);
}
Implementation
final bool toggleDaySelection;