-
New Feature
-
Resolution: Fixed
-
Later
-
2.1.5
-
Security Level: Jimmy
-
None
use case
Users use this zero duration meeting request as a reminder. Outlook/Office365 allows it.
steps to reproduce
- load the attached zul
actual result
an error modal window which contains "Illegal date: from Mon Sep 12 18:19:48 CST 2016 to Mon Sep 12 18:19:48 CST 2016" appears.
expected result
users can set the same time both on the begin date and end date.
extra info
- we can still add such 0-time event with the code below
SimpleCalendarEvent sce = new SimpleCalendarEvent(); java.util.Calendar calendar = java.util.Calendar.getInstance(); Date today = calendar.getTime(); sce.setBeginDate(today); sce.setEndDate(today); sce.setContent("This is the content of the event"); sce.setTitle("This is the title of the event"); cal.addDayEvent(sce);
But Calender displays it as a very small box with 4px height. It's hard to operate it.
- when rendering such 0-time event, Calendar should still render it with a minimal height.
workaround
- create a custom class, e.g. SameTimeCalendarEvent which extends SimpleCalendarEvent and accepts same time for both beginning and end date but internally turns the end date into half hour later than begin date. So that ZK calendar will show the event in a larger box. When call SameTimeCalendarEvent.getEndDate(), it still returns the same date time as the being date.