Disable resize event in custom calendar event, is this possible?

I have a problem adding a vaadin calendar. Can someone tell me if it is possible to create a custom calendar event for which resizing will be disabled and drag the event? Thanks..

+7
source share
1 answer

I'm not sure, but give it a try. In ScheduleView.java File

Find cal.setDropHandler(new DropHandler() {

and replace it with the following

  cal.setDropHandler(new DropHandler() { return false; } public AcceptCriterion getAcceptCriterion() { return AcceptAll.get(); } }); 

same as for BasicEventMoveHandler

  cal.setHandler(new BasicEventMoveHandler() { @Override public void eventMove(MoveEvent event) { return false; } } protected void setDates(MovieEvent event, Date start, Date end) { event.start = start; event.end = end; } }); 

Same for BasicEventResizeHandler

 cal.setHandler(new BasicEventResizeHandler() { @Override public void eventResize(EventResize event) { return false; } }); 

For start

Run the target installation of Maven and deploy the resulting WAR file to your server.

+1
source

All Articles