DateRangePickerMonthViewSettings class

The settings have properties which allow to customize the month view of the SfDateRangePicker.

Allows to customize the numberOfWeeksInView, firstDayOfWeek, dayFormat, viewHeaderHeight, showTrailingAndLeadingDates, viewHeaderStyle, enableSwipeSelection, blackoutDates, specialDates and weekendDays in month view of date range picker.


Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       body: SfDateRangePicker(
         view: DateRangePickerView.month,
         monthViewSettings: DateRangePickerMonthViewSettings(
             numberOfWeeksInView: 5,
             firstDayOfWeek: 1,
             dayFormat: 'E',
             viewHeaderHeight: 70,
             selectionRadius: 10,
             showTrailingAndLeadingDates: true,
             viewHeaderStyle: DateRangePickerViewHeaderStyle(
                 backgroundColor: Colors.blue,
                 textStyle:
                     TextStyle(fontWeight: FontWeight.w400, fontSize: 15, Colors.black)),
             enableSwipeSelection: false,
             blackoutDates: <DateTime>[
               DateTime.now().add(Duration(days: 4))
             ],
             specialDates: <DateTime>[
               DateTime.now().add(Duration(days: 7)),
               DateTime.now().add(Duration(days: 8))
             ],
             weekendDays: <int>[
               DateTime.monday,
               DateTime.friday
             ]),
       ),
     ),
   );
 }

Constructors

DateRangePickerMonthViewSettings({int numberOfWeeksInView: 6, int firstDayOfWeek: 7, String dayFormat: 'EE', double viewHeaderHeight: 30, @Deprecated('Use selectionRadius property in SfDateRangePicker') double selectionRadius, bool showTrailingAndLeadingDates: false, DateRangePickerViewHeaderStyle viewHeaderStyle, bool enableSwipeSelection: true, List<DateTime> blackoutDates, List<DateTime> specialDates, List<int> weekendDays})
Creates a date range picker month view settings for date range picker. [...]

Properties

blackoutDates List<DateTime>
Disables the interactions for certain dates in the month view of SfDateRangePicker. [...]
final
dayFormat String
Formats a text in the SfDateRangePicker month view view header. [...]
final
enableSwipeSelection bool
Enables the swipe selection for SfDateRangePicker, which allows to select the range of dates by swiping on the dates. [...]
final
firstDayOfWeek int
The first day of the week in the SfDateRangePicker month view. [...]
final
hashCode int
The hash code for this object. [...]
read-only, override
numberOfWeeksInView int
The number of weeks to display in SfDateRangePicker's month view. [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
selectionRadius double
The radius for the SfDateRangePicker selection circle in month view. [...]
@Deprecated('Use selectionRadius property in SfDateRangePicker'), final
showTrailingAndLeadingDates bool
Makes the SfDateRangePicker month view leading and trailing dates visible. [...]
final
specialDates List<DateTime>
In the month view of SfDateRangePicker highlights the unique dates with different style rather than the other dates style. [...]
final
viewHeaderHeight double
The height of the view header to the layout within this in month view of SfDateRangePicker. [...]
final
viewHeaderStyle DateRangePickerViewHeaderStyle
Sets the style to customize SfDateRangePicker month view view header. [...]
final
weekendDays List<int>
The weekends for month view in SfDateRangePicker. [...]
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
override