numberOfWeeksInView property

int numberOfWeeksInView
final

The number of weeks to display in SfDateRangePicker's month view.

Defaults to 6.

Note: If this property is set to a value other than ' 6, ' the trailing and lead dates style will not be updated and the trailing and leading dates will be displayed even if the showTrailingAndLeadingDates property is set to false.

This property not applicable when the SfDateRangePicker.pickerMode set as DateRangePickerMode.hijri.

See also: DateRangePickerMonthCellStyle to know about leading and trailing dates style.

See also:


Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       body: SfDateRangePicker(
         controller: _pickerController,
         view: DateRangePickerView.month,
         selectionMode: DateRangePickerSelectionMode.single,
         monthViewSettings:
             DateRangePickerMonthViewSettings(numberOfWeeksInView: 4),
       ),
     ),
   );
 }

Implementation

final int numberOfWeeksInView;