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.

See also:


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,
                          color: 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
             ]),
       ),
     ),
   );
 }

Mixed-in types
Annotations

Constructors

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

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.
no setteroverride
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.
no setterinherited
selectionRadius double
The radius for the SfDateRangePicker selection circle in month view.
final
showTrailingAndLeadingDates bool
Makes the SfDateRangePicker month view leading and trailing dates visible.
final
showWeekNumber bool
Used to displays the week number of the year in the month view of the SfDateRangePicker.
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
weekNumberStyle DateRangePickerWeekNumberStyle
Defines the text style for the text in the week number panel of the SfDateRangePicker.
final

Methods

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override