Skip to content

Weekly calendar showing incorrect dates despite following #581 #870

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

Closed
acwlaw opened this issue Aug 28, 2018 · 3 comments
Closed

Weekly calendar showing incorrect dates despite following #581 #870

acwlaw opened this issue Aug 28, 2018 · 3 comments

Comments

@acwlaw
Copy link

acwlaw commented Aug 28, 2018

  1. Version number: 7.1.5
  2. Yes.

Hello,

I am attempting to create a calendar with the option to switch between monthly and weekly views and have it function as closely to the Apple Calendar as possible.

My monthly calendar works fine and is set up with the following parameters:

let parameters = ConfigurationParameters(startDate: startDate,
                                                 endDate: endDate,
                                                 numberOfRows: 6 ,
                                                 calendar: Calendar.current,
                                                 generateInDates:  InDateCellGeneration.forAllMonths,
                                                 generateOutDates: OutDateCellGeneration.off,
                                                 firstDayOfWeek: DaysOfWeek.sunday,
                                                 hasStrictBoundaries: true)

Monthly calendar:
screen shot 2018-08-28 at 10 35 26 am

My weekly calendar however does not function as intended in that there are gaps between weeks and on months with dates not starting on Sunday, they are still being defaulted to the Sunday position.

screen shot 2018-08-28 at 10 35 39 am

screen shot 2018-08-28 at 10 35 49 am

The goal:
img_0578 copy

The weekly calendar is configured as:

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

I have tried following solutions posted on #581 , but it still does not function as intended.

Any ideas or suggestions of what may be going wrong? Thanks in advance!!

As a side note, I am having the numberOfRows, generateInDates, generateOutDates and hasStrictBoundaries parameters as variables that are toggled every time dates are selected. I think that's the right way to do it? Correct me if I'm wrong.

@patchthecode
Copy link
Owner

As a side note, I am having the numberOfRows, generateInDates, generateOutDates and hasStrictBoundaries parameters as variables that are toggled every time dates are selected. I think that's the right way to do it? Correct me if I'm wrong.

Thats how i would do it.

My weekly calendar however does not function as intended in that there are gaps between weeks and on months with dates not starting on Sunday, they are still being defaulted to the Sunday position.

  1. There are gaps between the weeks.

    • are ou sure you have hasStrictBoundaries setu to false
    • are you sure you are reloading the calendar
  2. and on months with dates not starting on Sunday, they are still being defaulted to the Sunday position

    • i am unsure what you mean by this

@patchthecode
Copy link
Owner

if you want a faster response, check me out here. Will be there for a couple hours.

@patchthecode
Copy link
Owner

closing issue.
reslolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants