Jtapplecalendar: How to set Current month?

Created on 3 May 2017  ·  10Comments  ·  Source: patchthecode/JTAppleCalendar

Please indicate me how to set calendar to show current month? Suppose we have march 2017, and in my calendar start date is january 2017 and end date is december 2017.

Currently it always show me january 2017 on load.

Most helpful comment

@jeffersonsetiawan yes.
every function in this library almost always have a lot optional parameters.

try this
calendarView.scrollToDate(theDate, animateScroll: false)

All 10 comments

I use like this: yourCalendar.scrollToDate(Date.init())
Dont know if it has a better option @patchthecode

Ok, thanks, and do you know how to reload current visible dates, not a whole calendar?

yourCalendar.reloadData() only reload the visible cells. He smart enough to do not reload the entire calendar

calendarUpdate() ? What object has that method? Because calendar doesnt have.

I've edit, its reloadData the correct method

ok:) thank you...

What @ggirotto said is correct.
Although i would just do

yourCalendar.scrollToDate(Date())

instead of Date.init()

Closing this issue as it is resolved.

Hi @patchthecode , when I use the scrollToDate, there was an animation that animate scrolling from the first available month, to the month I want to view it, can we just setup the visible month without animation??

@jeffersonsetiawan yes.
every function in this library almost always have a lot optional parameters.

try this
calendarView.scrollToDate(theDate, animateScroll: false)

great!! thank you @patchthecode for the fast response!! 👍

Was this page helpful?
0 / 5 - 0 ratings