Control UI for Calendars (not Calendar)

asked 2017-09-27 21:09:11 +0800

54patman gravatar image 54patman
13 1


I'm using ZK7/8 (still trying both) and I want to use the Calendars product but I can't seem to figure out how to control the UI. I want to remove the Hours column, make the cells drag and droppable and other fun stuff. How do get access to the the renderer?


delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-09-28 11:09:25 +0800

cor3000 gravatar image cor3000
5099 2 7
ZK Team

Hi Patman,

drag/drop of calendar events should be enabled by default - as you can see in the ZK Calendar Demo.

Dragging an event will trigger an onEventUpdate-Event. You have to listen to this event in order to apply the user change into the CalendarModel in order to update the UI (additionally you can save the updated information to your own persistence layer)

In the demo this happens in the Controller class CalendarController.java

//listen to the calendar-update of event data, usually send when user drag the event data 
@Listen("onEventUpdate = #calendars")
public void updateEvent(CalendarsEvent event) {
    DemoCalendarEvent data = (DemoCalendarEvent) event.getCalendarEvent();

Similarly when dragging empty cells you have to listen to the onEventCreate-Event in order to insert a new entry into the SimpleCalendarModel or provide a Dialog to edit the new event first.

I am not sure about removing the hours column right now - on the other hand I don't see how the calendar would be useful without that information.


link publish delete flag offensive edit


Thanks for the reply. I'll see what I can do.

54patman ( 2017-09-28 21:53:14 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2017-09-27 21:09:11 +0800

Seen: 15 times

Last updated: Sep 28 '17

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More