Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get current displayed month in table_calendar package flutter

I'm building a calendar using the table_calendar flutter package. Other all things are done now just I want to get currently selected month from the calendar. I try to find out the way and try all the events but did not get success yet. Anyone have a solution, help me a lot.

Package Link: https://pub.dev/packages/table_calendar

like image 393
Ravindra Bhanderi Avatar asked Sep 13 '25 06:09

Ravindra Bhanderi


1 Answers

Looking at https://pub.flutter-io.cn/documentation/table_calendar/latest/table_calendar/CalendarController-class.html

You should be able to get the current month by using focusedDay on the CalendarController.

focusedDay → DateTime
Currently focused day (used to determine which year/month should be visible).
read-only
like image 83
Tomas Avatar answered Sep 15 '25 23:09

Tomas