initialSelectedDates property

List<HijriDateTime>? initialSelectedDates
final

The collection of dates to initially select on the SfHijriDateRangePicker.

If it is not null the SfHijriDateRangePicker will select the dates that set to this property.

Defaults to null.

Note: If the controller and it's controller.selectedDates property is not null then this property will be ignored and the widget render the selection for the dates given in controller.selectedDates.

It is only applicable when the selectionMode set as DateRangePickerSelectionMode.multiple.

See also:


Widget build(BuildContext context) {
return MaterialApp(
     home: Scaffold(
       body: SfHijriDateRangePicker(
         view: HijriDatePickerView.month,
         selectionMode: DateRangePickerSelectionMode.multiple,
         initialSelectedDates: <HijriDateTime>[
           HijriDateTime.now().add((Duration(days: 4))),
           HijriDateTime.now().add((Duration(days: 5))),
           HijriDateTime.now().add((Duration(days: 9))),
           HijriDateTime.now().add((Duration(days: 11)))
         ],
       ),
     ),
   );
}

Implementation

final List<HijriDateTime>? initialSelectedDates;