Hi,
i want to know, how to disable drag&drop for calendar events. Calendar.setReadOnly is no option, because i need some events like weekClick.
Thanks
Andre
Hi,
i want to know, how to disable drag&drop for calendar events. Calendar.setReadOnly is no option, because i need some events like weekClick.
Thanks
Andre
Hello,
I have exactly the same problem.
I also need to have a “readonly” calendar, where the user is not supposed to add / remove or change any events. The user should on the other hand still have the possibility to navigate through the calendar.
Is there a way to capture the events (in the listener or handler) and prevent the event from “bubbling” up, as on can in other frameworks by using some “event.stop()” or “event.preventDefault” or by removing the default handler/listener?
Many thanks in advance for your support.
Alex
Yes, I too have this question and posted as a separate thread.
Somewhat disappointing that something that simple and essential can not be addressed.
Thanks
-J
Turns out this is this is really simple:
calComponent.setReadOnly(true);
Don’t know how I could have missed this one
-J
I have the same issue. As Andre Peters, said Calendar.setReadOnly is not an option because it also deactivates navigation clicks.
I have same issue. When I use the readonly mode, I can’t expand the day with too many event in month view mode.
Disabling drag& drop can be achieved as follows :
Calendar schedule = new Calendar();
schedule.setHandler((CalendarComponentEvents.EventMoveHandler) null);
Thanks for your answer.
It works for week view. However, It doesn’t work in month view, I can drag and drop the event.
Thank you Koenraad, but as Stéphane said there’s still issues.
Isn’t it a bug that “setReadOnly(true)” prevents from doing navigation operations? I wouldn’t expect that clicking on a date, or clicking on “+xxx” when there’s several events hidden, is considered as a “write” operation. It’s definetely “read”, so shouldn’t be affected by “setReadOnly”.
I’ve commited a patch for this, https://dev.vaadin.com/review/#/c/7107/
Haven’t tested it with hidden multiple events yet though, but navigation should work.
Thanks very much! I’ll test it asap
Thank you ! I’ll test it soon as possible too.
I just uploaded a new version where also the hidden events can be expanded.
Hello, I see that this correction will be inside the 7.4.1 release. However, I can’t find a nighty build of this version to test the integration.
Have you a date of this release ?
Thanks in advance.
Have you tried version 7.4-SNAPSHOT ? The fix should’ve been there for about a week.
If you want to download the files manually, you can find last nights snapshot here: https://vaadin.com/download/nightly/7.4/7.4.0.SNAPSHOT-38-f3bd2d3b6ea02a8c8180c11066d50c61d3dae351/
7.4.1 should be out next week: http://dev.vaadin.com/roadmap
Thank you very much for your links. They will be useful for us !