How to change time range width and height for time line month in Flutter Calendar?I want to set interval height and width when the timeline is in month view. How can I do it. Can you help me? I am using resource view calendar. I wanted to change the width and height in the month view using resourceViewSettings and timeSlotViewSettings, but it didn't work, please help.
Thank you.
Hi Nihat,
Regarding Query: How to change the time interval width and height in the time line month view.
As per the current implementation timeIntervalHeight is applicable for day, week, work week views not applicable for month view. By using the timeIntervalWidth property you can change the width of the time slots in timeline views (timeline day, week, work week, and month views). We have mentioned this in our documentation also. Please find the documentation from the following link.
Link:
Also, we have KB documentation for changing the timeIntervalWidth and timeINtervalHeight in the Flutter calendar. Please find the documentation from the following link.
KB link:
We hope that this helps you. If possible can you please share your requirement with time interval height and width clearly? It would be helpful for us to analyze and provide you solution at the earliest.
Regards,
Indumathi R
Thank you for answer.but;
return MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( body: SafeArea( child: SfCalendar( view: CalendarView.month, timeSlotViewSettings: TimeSlotViewSettings( timeIntervalHeight: 80, timeIntervalWidth: 100), ), )), );
I want to set the width and height of cells while in CalendarView.month as above. How can I do that. In the examples you sent, it adjusts the width and height of the day and week view. I want to change the width and height of the cells in the calendar while in the month view, but it doesn't work.
In the month view, I don't just want to change the width, I want to adjust the height as well.
Thanks
As per the current implementation of the calendar, there is no support to change the height of the month cells. Also, in calendar month cell height will be arranged based on the number of weeks and available height of calendar. By placing the SfCalendar inside the Card widget, you can add the margin for all sides, and the height will be adjusted based on the margin value. Please find the code snippet for the same.
Also, please find the example code snippets for the same.
Code snippets:
body: Card(margin: const EdgeInsets.fromLTRB(50, 150, 50, 150), child: SfCalendar(view:CalendarView.month)), |
body: Container(height: 300, width: 400, |
We hope that this helps you. Please let us know if you need further assistance.