19 package org.turro.calendar.info;
21 import java.util.Date;
22 import org.amic.util.date.CheckDate;
23 import org.turro.calendar.CalendarMode;
24 import org.turro.elephant.util.DateFormats;
25 import org.turro.util.Chars;
26 import org.zkoss.zk.ui.Component;
27 import org.zkoss.zk.ui.event.ForwardEvent;
28 import org.zkoss.zk.ui.util.Clients;
29 import org.zkoss.zk.ui.util.GenericForwardComposer;
30 import org.zkoss.zul.Datebox;
31 import org.zkoss.zul.Label;
40 private Label currentDate;
41 private Datebox currentBox;
72 calendar.setCurrentDate(java.util.Calendar.getInstance().getTime());
77 public void onDayClick
$calendar(ForwardEvent event) {
78 calendar.setCurrentDate((Date) event.getOrigin().getData());
89 calendar.setCurrentDate(currentBox.getValue());
94 private void setCurrentDate() {
95 Date curr = calendar.getCurrentDate();
98 currentBox.setValue(curr);
100 currentDate.setValue(
102 Chars.forward().spaced().toString() +
104 currentBox.setValue(calendar.getBeginDate());
106 currentDate.setValue(DateFormats.monthName(curr) +
107 Chars.forward().spaced().toString() +
108 new CheckDate(curr).getYear());
109 currentBox.setValue(calendar.getBeginDate());
116 super.doAfterCompose(comp);
120 private void setTooltips() {
121 Clients.evalJavaScript(
"setTimeout(addTooltips, 1000);");
void onChange $currentBox()
void onDayClick $calendar(ForwardEvent event)
void doAfterCompose(Component comp)
void setMode(CalendarMode mode)