weekendDays property
The weekends for month view in SfDateRangePicker.
Defaults to <int>[6,7]
represents <int>[DateTime.saturday, DateTime.sunday]
.
Note: The weekendDays will not be highlighted until it's customize by using the DateRangePickerMonthCellStyle.weekendTextStyle or DateRangePickerMonthCellStyle.weekendDatesDecoration property.
See also:
- DateRangePickerMonthCellStyle.weekendTextStyle, which used to set text style for the week end cell text in month view.
- DateRangePickerMonthCellStyle.weekendDatesDecoration, which used to set decoration for the week end cell text in month view.
- specialDates, which used to highlight specific dates in the month view of date range picker.
- blackoutDates, which used to restrict the user interaction for the specific dates in teh month view of date range picker.
- numberOfWeeksInView, which allows to customize the displaying week count in month view of date range picker.
- Knowledge base: How to change the week end dates
- Knowledge base: How to change the number of weeks
- Knowledge base: How to apply theming
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfDateRangePicker(
controller: _pickerController,
view: DateRangePickerView.month,
selectionMode: DateRangePickerSelectionMode.range,
monthViewSettings: DateRangePickerMonthViewSettings(
weekendDays: <int>[DateTime.friday, DateTime.saturday]),
),
),
);
}
Implementation
final List<int> weekendDays;