flutter-examples icon indicating copy to clipboard operation
flutter-examples copied to clipboard

Remove empty space on Bottom when showTrailingAndLeadingDates is false

Open quocviet1996 opened this issue 1 year ago • 3 comments

image

So i have a calendar like this,which only shows days in the month, so i set showTrailingAndLeadingDates to false, but i can't remove this empty space, how can i do that? Thanks.

quocviet1996 avatar May 16 '23 10:05 quocviet1996

Hi Team,

As per the calendar behavior to render the calendar we need 6 rows, using the NumberOfWeeksInView property we can customize it. So, that the calendar month cell height will be arranged based on the number of weeks and available height of calendar. Also, using the ShowLeadingAndTrailingDays property we can hide the previous or next month dates. As per the calendar implementation we can’t restrict this behavior for particular month. Empty spaces will be there when using this property, which is an expected behavior of calendar.

We hope that this helps you. Please let us know if you need further assistance on this.

Regards, Indumathi R

IndumathiR-1995 avatar Nov 30 '23 12:11 IndumathiR-1995

I can fix this for u. please let me know if u interested.

SourabhKumar11 avatar Jan 07 '24 10:01 SourabhKumar11

Hi @SourabhKumar11 , As said earlier and as per the calendar implementation we can’t restrict this behavior for particular month. Empty spaces will be there when using this property, which is an expected behavior of calendar.

LavanyaGowtham2021 avatar Feb 14 '24 09:02 LavanyaGowtham2021