Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    CalendarEvent editable

    Hi,

    in 6.0p, when you created a CalendarEvent like this:

    Code:
    CalendarEvent myEvent = new CalendarEvent(24, "Doc viewer","Enhance documentation viewer with these additional syntax-hilites: ...",new Date(year, month, start + 18), new Date(year, month, start + 19, 23, 59, 59), "kaiKong");
    myEvent.setCanEdit(false);
    you weren't able to click on the event ( because of the setCanEdit(false). So when you tried to click on the event nothing happened ).
    This behavior seems to have changed in 6.1p. When I set .setCanEdit(false), the event is clickable, but the "save" button and the information are greyed out.
    But how to avoid that the window opens when the user clicks on the event ?

    Using smartgwt power 6.1-p20180416

    #2
    Yes, we fixed a bug where a click on a disabled event would fall through to a background-click in the Calendar itself, opening the eventDialog to create a new event.

    If you don't want to show a disabled editor for disabled events, you can setEventClickHandler() and call cancel() from the handler you pass, if event.getCanEdit() is false. If you want the old behavior, you could also call showEventDialog/Editor(event, isNewEvent) before returning.

    Comment

    Working...
    X