firstDayOfWeek property
The first day of the week in the SfDateRangePicker month view.
Allows you to change the first day of the week in the month view, every month view will start from the day set to that property.
Defaults to 7
which indicates DateTime.sunday
.
See also:
- showWeekNumber, which displays the week number of the year in the month view of the date range picker.
- showTrailingAndLeadingDates, which used to display the previous month and next month dates on the month view of the date range picker.
- numberOfWeeksInView, which used to customize the displaying week count in the month view of date range picker.
- Knowledge base: How to change the first day of week
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfDateRangePicker(
controller: _pickerController,
view: DateRangePickerView.month,
selectionMode: DateRangePickerSelectionMode.range,
monthViewSettings:
DateRangePickerMonthViewSettings(firstDayOfWeek: 2),
),
),
);
}
Implementation
final int firstDayOfWeek;