The calendars object is a child of a Popup, this maybe what is causing an issue. I have tried invalidate on the calendar. What do you mean by notify the calendars object ??
JustinFrost ( 2013-06-21 08:06:13 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi All,
I have a Calendars object in month mold which I have extended and put some custom controls to change the month.
When I click on the right arrow it executes the following on the Calendars object:
getLeaveCalendar().nextPage();
However the calendar month is not changing. Do I need to do anything else to refresh the calendar on the page ??
first notify calendars object.
or use invalidate() method to reset calendars.
The calendars object is a child of a Popup, this maybe what is causing an issue. I have tried invalidate on the calendar. What do you mean by notify the calendars object ??
JustinFrost ( 2013-06-21 08:06:13 +0800 )editJust to clarify. I have created a custom popup :
CalendarPopup extends popup {
Calendars cal = null;
Label monthLabel = null;
public void CalendarPopup(){
Div controlDiv = new Div();
Image left = new Image("/images/left.png");
Image right = new Image("/images/right.png");
monthLabel = new Label();
control.appendChild(right);
control.appendChild(monthLabel);
control.appendChild(left);
this.appendChild(control);
cal = new Calendars();
cal.setMold("month");
this.appendChild(cal);
}
public getCalendar(){
return cal;
}
public setCalendar(Calendars cal){
}
public getMonthLabel(){
return monthLabel;
}
public setMonthLabel(Label label){
monthLabel = label;
}
}
I have setup listeners on the right image to do the following:
getCalendar().nextPage();
And then included this component in my zul page as a custom component:
<CalendarPopup/>
All renders ok, but the calendar does not update when I click the right arrow, although the nextPage() code is executed in debug.
add this new Method then use it
public void goNext(){
cal.nextPage();
}
Thanks for your reply hswain. Is this not the same as getCalendar().nextPage() ? getCalendar returns cal...
JustinFrost ( 2013-06-26 02:05:29 +0800 )editAsked: 2013-06-21 04:07:14 +0800
Seen: 19 times
Last updated: Jun 24 '13
arrow buttons are not appearing(invisible) in zk calendar
Can size of datebox picker be changed?
zkcalendar - compilation error
zk calendar: Highlight Some Event Dates [closed]
zk:calendar Highlight Some Dates
ZKCalendar returns null onDayClick event