Announcement

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

    [bug?] Calendar.getDayBodyHTML and eventClick

    SmartClient Version: v8.3p_2013-07-10/PowerEdition Development Only (built 2013-07-10)
    and
    SmartClient Version: v9.0p_2013-07-10/EVAL Development Only (expires 2013.09.08_09.05.36) Licensed to: Isomorphic Software (#ISC_EVAL_NIGHTLY)

    I've implemented getDayBodyHTML to obtain a series of links, as in default implementation, but with different information displayed (I have a custom eventEditor with two fields which I must display concatenated, instead of startTime and 'name' fields)

    I want to retain the default behaviour of a clickable link, so my links call calendar.eventClick as the docs says for getDayBodyHTML, but clicking has no effect (and no errors in the developer console).

    Actually the default links calls another method, monthViewEventClick, but it's not documented.
    This is a default link as seen with chrome console:
    Code:
    <a href="javascript:eventCalendar.monthViewEventClick(3,5,0);" class="calMonthEventLink">11:00 am Meeting</a>
    so I've modified the #simpleCalendar sample.
    In the eventData tab, I've modified the first event like this:
    Code:
    {
        eventId: 1, 
        name: "Test",
        description: "Test Event",
        startDate: new Date(2013,6,15,12),
        endDate: new Date(2013,6,15,14)
    }
    and then, in the developer console, I've tried this code:
    Code:
    eventCalendar.eventClick({
        eventId: 1, 
        name: "Test",
        description: "Test Event",
        startDate: new Date(2013,6,15,12),
        endDate: new Date(2013,6,15,14)
    },'month')
    which is equivalent to the code I was trying in my customized links.

    But the eventEditor doesn't appear. Is it a bug, or I'm doing something wrong?
    Last edited by claudiobosticco; 11 Jul 2013, 01:09.

    #2
    eventClick is an event where you can put your custom code. It has no default implementation, so your code is a no-op.

    You can just show your custom event editor and use addEvent/updateEvent to modify the data in the calendar.

    Comment

    Working...
    X