numberOfWeeksInView property
The number of weeks to display in SfCalendar 's month view.
Defaults to 6
.
Note: If this property is set to a value less than or equal to ' 4, ' the trailing and lead dates style will not be updated.
See also:
- showTrailingAndLeadingDates, which used to restrict the rendering of leading and trailing dates on month view of calendar.
- showAgenda, which allows to display agenda view as a part of month view in calendar.
- agendaViewHeight, which is the size for agenda view on month view of calendar.
- Knowledge base: How to change the number of weeks
Widget build(BuildContext context) {
return Container(
child: SfCalendar(
view: CalendarView.month,
monthViewSettings: MonthViewSettings(
dayFormat: 'EEE',
numberOfWeeksInView: 4,
appointmentDisplayCount: 2,
appointmentDisplayMode: MonthAppointmentDisplayMode.appointment,
showAgenda: false,
navigationDirection: MonthNavigationDirection.horizontal),
),
);
}
Implementation
final int numberOfWeeksInView;