viewNavigationMode property

ViewNavigationMode viewNavigationMode
final

Specifies the view navigation for SfCalendar to show dates for the next or previous views.

Defaults to ViewNavigationMode.snap.

Not applicable when the view set as CalendarView.schedule. It will not impact scrolling timeslot views, controller.forward, controller.backward and showNavigationArrow.

See also:

  • minDate, to restrict the navigation and interaction to the dates before to this date in calendar.
  • maxDate, to restrict the navigation and interaction to the dates after to this date in calendar.
  • showNavigationArrow, to enable the navigation arrow, which enables to navigate to the next/previous view of calendar programmatically.
  • Knowledge base: How to restrict view navigation
Widget build(BuildContext context) {
   return Container(
     child: SfCalendar(
       view: CalendarView.day,
       viewNavigationMode: ViewNavigationMode.snap,
     ),
   );
 }

Implementation

final ViewNavigationMode viewNavigationMode;