Uploaded image for project: 'ZK Calendar'
  1. ZK Calendar
  2. ZKCAL-63

CalendarEvents longer than 12 hours are displayed as all day event

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.0.0
    • 2.1.5
    • Security Level: Jimmy
    • None

      Reproducible sample:

      <zk>
      	<zscript><![CDATA[
      	import org.zkoss.calendar.impl.SimpleCalendarEvent;
      	import org.zkoss.calendar.impl.SimpleCalendarModel;
      	import java.util.Calendar;
      	
      	public void init() {
      		SimpleCalendarModel model = new SimpleCalendarModel();
      		SimpleCalendarEvent event = new SimpleCalendarEvent();
      		Calendar cal = Calendar.getInstance();
      		cal.set(Calendar.MINUTE, 0);
      		cal.set(Calendar.SECOND, 0);
      		event.setBeginDate(cal.getTime());
      		cal.add(Calendar.HOUR_OF_DAY, 12);
      		event.setEndDate(cal.getTime());
      		model.add(event);
      		mycal.setModel(model);
      	}
      	]]></zscript>
      	<calendars id="mycal" onCreate="init()" hflex="1" vflex="1"/>
      </zk>
      

      current result

      the event showed as all-day event.

      Excepted result

      should see CalendarEvent showed in correct begin/end time.

            Leon03 Leon03
            vincentjian vincentjian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: