toggleDaySelection property Null safety

bool toggleDaySelection
final

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:


Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       body: SfDateRangePicker(
         view: DateRangePickerView.month,
         selectionMode: DateRangePickerSelectionMode.single,
         toggleDaySelection: true,
       ),
     ),
   );
 }

Implementation

final bool toggleDaySelection;