Jtapplecalendar: Single row weekly calendar has duplicated dates between 2 months

Created on 18 Apr 2017  路  5Comments  路  Source: patchthecode/JTAppleCalendar

version: 7.0.1

I want a weekly continuous scroll calendar in my project. And I read the document here:
https://patchthecode.github.io/CalendarLayout/

So I set the configuration as

let parameters = ConfigurationParameters(
    startDate: startDate, 
    endDate: endDate,     
    numberOfRows: 1,
    calendar: Calendar.current,
    generateInDates:  .forAllMonths,
    generateOutDates: .off,
    firstDayOfWeek:   .sunday,
    hasStrictBoundaries: false
)

But at the end of every month (at the same time the start of the next month), there are always duplicated dates of the previous month.
Also, the weekday would be collapsed after these duplicated dates.

notice the 30th and 31th
There are two 30th and 31th...

Is this a bug or I misunderstood the document, especially the meaning of hasStrictBoundaries?

This is not a bug. Works as expected.

All 5 comments

Its not a bug. What you are seeing is what every one else is asking for in singlerow mode --> The ability to remove in-dates and out-dates.

If you notice, in 6-row mode, you will see grayed out dates represesting in-dates/out-dates of the previous month and following month.

screen shot 2016-09-07 at 3 17 33 pm

So on the single row, you are simply seeing inDates.
To get the single row that you desire, set inDates to first month only, and set outDates to Off.

Thank you for your reply. I think I got your point.

After I set the generateInDates to .forFirstMonthOnly, I got exactly what I want.

A single row weekly calendar

Thank you very much!

It might be better for someone who want a weekly calendar like me if you put a single row weekly calendar configuration example in the document.

cool. cheers 馃嵒

How it will workout if we have static day headers?

@dipendra-sharma
this is the setup for a single row calendar -> https://github.com/patchthecode/JTAppleCalendar/issues/581

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kevinw14 picture Kevinw14  路  3Comments

oddpandadesign picture oddpandadesign  路  5Comments

arn00s picture arn00s  路  3Comments

nikolalukovic picture nikolalukovic  路  4Comments

dbmrq picture dbmrq  路  5Comments