Skip to content

How to show a particular week in a day view of Flutter event calendar(SfCalendar)

Notifications You must be signed in to change notification settings

SyncfusionExamples/particular-week-in-a-day-view-flutter-event-calendar

Repository files navigation

How to show a particular week in a day view of Flutter Calendar?

A quick-start example to show a particular week in a day view of Flutter Calendar.

You can display a specific week in day view in the Flutter Event Calendar by using the calendar's minDate and maxDate properties.

The minDate restricts date navigation features backward, and touch gestures cannot be used to swipe the control beyond the min date range. The maxDate will restrict date navigation features forward, and you will be unable to swipe the control with a touch gesture beyond the maximum date range.

Using the onViewChanged callback of the Flutter calendar you can get the first and last dates of the visible dates. Then assign the first and last dates as minDate and maxDate of the Calendar.

You can also refer our UG documentation to know more about DateRestriction

Requirements to run the demo

How to run this application

To run this application, you need to first clone or download the ‘create a flutter maps widget in 10 minutes’ repository and open it in your preferred IDE. Then, build and run your project to view the output.

Further help

For more help, check the Syncfusion Flutter documentation, Flutter documentation.