JTCalendar icon indicating copy to clipboard operation
JTCalendar copied to clipboard

Can't see month of calendar

Open david-koch-pro opened this issue 8 years ago • 5 comments

I am using UTCalendar in swift3 project. But couldn't show months.

I've added UTCalendarMenuView outlet and defined delegate method about menu view. Below is my code.

screen shot 2017-01-09 at 6 21 30 pm

screen shot 2017-01-09 at 6 21 42 pm

The result is below

simulator screen shot jan 9 2017 6 31 37 pm

What's wrong?

david-koch-pro avatar Jan 09 '17 03:01 david-koch-pro

There is 2 things to do:

  • set the menu view to the manager in ObjC [_calendarManager setMenuView:_calendarMenuView];
  • set the date to the manager after setting the menu view [_calendarManager setDate:yourDate]; it's not clearly explain in the documentation, but if you set the date before, the menu view and content view are not initialised

Or you may have a problem of constraint of frame.

johnvuko avatar Jan 09 '17 20:01 johnvuko

I am also facing the same issue. I have set the menuView before setting the date. It does not display the month and year at times.

kdkaur89 avatar Jan 10 '17 08:01 kdkaur89

I am so sad for this issue. Is there anybody who can help me?

david-koch-pro avatar Feb 22 '17 14:02 david-koch-pro

For me problem was in the method

- (void)updatePageMode:(NSUInteger)pageMode
{
   if(_pageMode == pageMode){
        return;
    }
    
    _pageMode = pageMode;
    [self repositionViews];
}

Line [self repositionViews] wasn't called never for JTCalendarPageModeFull.

I've changed method to

- (void)updatePageMode:(NSUInteger)pageMode
{
    _pageMode = pageMode;
    [self repositionViews];
}

Yes, maybe it is not good idea, but it works for me in my case

KirylBelasheuski avatar May 23 '17 11:05 KirylBelasheuski

I am also facing same issue. It's not displaying at the start of calendar is loaded. After swiping through two months previous or next then it will visible. Please give a proper solution.

@jonathantribouharet

MaheshGawhane11 avatar Aug 05 '19 04:08 MaheshGawhane11