Jtapplecalendar: Mess with dates after calendar scrolling

Created on 5 Jun 2019  路  7Comments  路  Source: patchthecode/JTAppleCalendar

Version Number: Using JTAppleCalendar (7.1.7)

I'm trying to show the current month with the app start.

I call calendarView.scrollToDate(Date(), animateScroll: false) in viewDidLoad and it gives me wrong dates order.
Screen Shot 2019-06-05 at 4 05 43 PM

If I'll click the previous month and then return to the current calendar shows the right ones.
Screen Shot 2019-06-05 at 4 19 30 PM

All 7 comments

  1. do you have a regular calendar view inside of a UIViewController?
    or do you have a more complex setup, with views stacked inside views?

  2. is it possible you can provide a sample program demonstrating this?

Regular calendarView inside MyViewController's root view :)
conferenceroomcalendar.zip

Also, I noticed that function calendar 'willScrollToDateSegmentWith' doesn`t get called with 'calendarView.scrollToSegment' so I couldn't update the monthLabel.

ok it looks like this behavior is expected.
You have the scrolling mode set to .none. Therefore if youre scroll to today's date (the 5th), you will see the 5th cell is scrolled to the left side.

If you have your scrolling mode set paged scrolling, then it would not stop at the 5th. it will scroll to the next paged section. Whish should be the behavior u want.

So either set it to paged mode in storyBoard, or set it in the ViewDidLoad in code.
If you set it in code, here are the possible options you can use --> https://patchthecode.com/jtapplecalendar-home/scrolling-modes/

Thank you a lot!! I didn't notice this scrolling options. What about 'willScrollToDateSegmentWith' function. I see that it doesn't get called in pair with 'scrollToSegment'. How can I update the month label in the right way?

built this project for 2+ years, and you found a bug. haha.
i forgot to call that delegate-function within the segment one.

Will fix later today.

since this is fixed. Closing this issue.
Ive created a new one to reflect the calling of the delegate function here
https://github.com/patchthecode/JTAppleCalendar/issues/1070

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kevinw14 picture Kevinw14  路  3Comments

prahaladm picture prahaladm  路  3Comments

dbmrq picture dbmrq  路  5Comments

programus picture programus  路  5Comments

zhanswift picture zhanswift  路  5Comments