-
Notifications
You must be signed in to change notification settings - Fork 810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Singlerow -- Single Row -- WeekView -- week view calendar setup #581
Comments
Configuring a single row calendar with a scrolling headerQuestion from user: Hey there, My Paramameter is: ConfigurationParameters(startDate: startDate, endDate: endDate,
numberOfRows: 1,
calendar: Calendar.current,
generateInDates: InDateCellGeneration.forFirstMonthOnly,
generateOutDates: OutDateCellGeneration.off,
firstDayOfWeek: DaysOfWeek.monday,
hasStrictBoundaries: false)
Scrolling Direction: Horizontal It works fine without the header, but when I add header, it creates the gap between months like this AnswerYes, this is expected. The reasoning is this. Fix: If you want your "header" view to scroll with your cells (in a single row calendar), then do not implement a header externally. Instead do this:
Like this: The cell can look like this, with a header on top. The label at the top will match the day of the cell. |
The correct setup for (most) Single row calendar is what you see below.
Setting it up this way causes the inDates, to create an "offSet" which causes the other days/dates to be properly aligned.
Also, if you do not set it up this way, and you do NOT have
generateOutDates
set tooff
, you will see the outDates generated and you will begin to think that your calendar is showing dates twice. And then you'll create an issue telling me that there's a bug. And Then i'll have to create explanations like this :)The text was updated successfully, but these errors were encountered: