Fscalendar: Row height for weekly calendar.

Created on 30 Mar 2017  ·  7Comments  ·  Source: WenchaoD/FSCalendar

How to change row height for weekly calendar? i.e. I am showing weekly calendar with height of 120 But it is showing very tiny dates under week days. how can make them bigger?

Most helpful comment

I had the same problem till I figured out that FSCalendar is always calculating the row height for the monthly calendar. You need to look at FSCalendar.m - (CGFloat)preferredRowHeight:

if (!self.floatingMode) {
            _preferredRowHeight = (contentHeight-padding*2)/6.0;
}

So you could either remove the /6.0 or set the calendar frame height to something like (finalHeight - headerHeight - weekdayHeight - 10) * 6 + headerHeight + weekdayHeight

I think the row height should be calculated differently if only the weekly calendar is shown. This would it make much easier.

All 7 comments

Screen Shot of my view.
screen shot 2017-03-31 at 2 24 52 am

@BurhanMughal try to play with Heigh Attributes in StoryBoard. I had the same problem and I started to change the library classes related with collection view flow layout, but if you don't have to make a big customisation this is the fastest way, it works for me. ¡I expect this will help you 😃!

captura de pantalla 2017-04-06 a las 18 19 06

I had the same problem till I figured out that FSCalendar is always calculating the row height for the monthly calendar. You need to look at FSCalendar.m - (CGFloat)preferredRowHeight:

if (!self.floatingMode) {
            _preferredRowHeight = (contentHeight-padding*2)/6.0;
}

So you could either remove the /6.0 or set the calendar frame height to something like (finalHeight - headerHeight - weekdayHeight - 10) * 6 + headerHeight + weekdayHeight

I think the row height should be calculated differently if only the weekly calendar is shown. This would it make much easier.

@WenchaoD can you fix it? or accept PR?

Any plans to merge this in? Facing same problem with week view!

this is my one..I can select calendar dates in two colors
Screen Shot 2019-10-28 at 4 56 44 PM

the same

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rintoandrews90 picture rintoandrews90  ·  4Comments

thaoth58 picture thaoth58  ·  3Comments

TomWang1 picture TomWang1  ·  5Comments

GDXRepo picture GDXRepo  ·  3Comments

garudaonekh picture garudaonekh  ·  4Comments