monthViewSettings property
Options to customize the month view of the SfHijriDateRangePicker.
Allows to customize the HijriDatePickerMonthViewSettings.firstDayOfWeek, HijriDatePickerMonthViewSettings.dayFormat, HijriDatePickerMonthViewSettings.viewHeaderHeight, HijriDatePickerMonthViewSettings.viewHeaderStyle, HijriDatePickerMonthViewSettings.enableSwipeSelection, HijriDatePickerMonthViewSettings.blackoutDates, HijriDatePickerMonthViewSettings.specialDates and HijriDatePickerMonthViewSettings.weekendDays in month view of date range picker.
See also:
- HijriDatePickerMonthViewSettings, to know more about available options to customize the month view of hijri date range picker
- monthCellStyle, which allows to customize the month cell of the month view of the hijri date range picker
- cellBuilder, which allows to set custom widget for the picker cells in the hijri date range picker.
- yearCellStyle, which allows to customize the year cell of the year, and decade views of the hijri date range picker.
- backgroundColor, which fills the background of the hijri date range picker.
- todayHighlightColor, which highlights the today date cell in the hijri date range picker.
- Knowledge base: How to customize the special dates using builder
- Knowledge base: How to update blackout dates using onViewChanged callback
- Knowledge base: How to select all days when clicking on the day header
- Knowledge base: How to change the first day of week
- Knowledge base: How to customize the date range picker cells using builder
- Knowledge base: How to change the week end dates
- Knowledge base: How to add active dates
- Knowledge base: How to apply theming
- Knowledge base: How to restrict swipe gesture for range selection
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfHijriDateRangePicker(
view: HijriDatePickerView.month,
selectionRadius: 10,
monthViewSettings: HijriDatePickerMonthViewSettings(
firstDayOfWeek: 1,
dayFormat: 'E',
viewHeaderHeight: 70,
viewHeaderStyle: DateRangePickerViewHeaderStyle(
backgroundColor: Colors.blue,
textStyle:
TextStyle(fontWeight: FontWeight.w400,
fontSize: 15, color: Colors.black)),
enableSwipeSelection: false,
blackoutDates: <HijriDateTime>[
HijriDateTime.now().add(Duration(days: 4))
],
specialDates: <HijriDateTime>[
HijriDateTime.now().add(Duration(days: 7)),
HijriDateTime.now().add(Duration(days: 8))
],
weekendDays: <int>[
DateTime.monday,
DateTime.friday
]),
),
),
);
}
Implementation
final HijriDatePickerMonthViewSettings monthViewSettings;