Announcement

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

    Does Calendar (not Timeline) Support addZone()

    We are a current smartGWT 4 client considering upgrade to latest version of smartGWT.

    Testing v12.0p_2018-08-11/EVAL Deployment
    Browsers: Chrome

    I've tried adding a calendar zone to a Calendar (not Timeline) using calendar.addCalendarEvent(zone) where zone is a defined CalendarEvent.

    Here are the first few lines of the error:

    13:06:25.726:TMR2:WARN:drawing:$151s:negative or zero area: height: 1, width: 0, refusing to draw
    Canvas.readyToDraw() on [Canvas ID:$151s] @ ISC_Core.js:2590:188
    Canvas.draw(_1=>undef) on [Canvas ID:$151s] @ ISC_Core.js:2599:94
    [c]EventCanvas.getHeaderHeight(_1=>"13:05 test", _2=>0, _3=>14, _4=>true, _5=>[ZoneCanvas ID:isc_Calendar_0_zoneCanvas]) on [Class EventCanvas] @ ISC_Calendar.js:695:207
    EventCanvas.getHeaderHeight(_1=>undef) on [ZoneCanvas ID:isc_Calendar_0_zoneCanvas] @ ISC_Calendar.js:716:1301
    EventCanvas.getInnerHTML() on [ZoneCanvas ID:isc_Calendar_0_zoneCanvas] @ ISC_Calendar.js:726:145
    Canvas._getInnerHTML(_1=>undef) on [ZoneCanvas ID:isc_Calendar_0_zoneCanvas] @ ISC_Core.js:2587:68
    Canvas._updateInnerHTML() on [ZoneCanvas ID:isc_Calendar_0_zoneCanvas] @ ISC_Core.js:2698:199
    Canvas._updateHTML() on [ZoneCanvas ID:isc_Calendar_0_zoneCanvas] @ ISC_Core.js:2690:57
    Canvas.redraw(_1=>"show() while dirty") on [ZoneCanvas ID:isc_Calendar_0_zoneCanvas] @ ISC_Core.js:2683:705

    I wanted to confirm that zones should work with Calendar as well as Timeline before doing a bunch more debugging.

    Thanks,

    Andrew





    #2
    Zones are only supported in Timelines (TimelineView) in current versions.

    You could control the cell colors/css to highlight certain time-ranges in the other views, if that's the kind of thing you want to do - see setDateCSSTextCustomizer(DateCSSTextCustomizer)

    Comment


      #3
      Thanks for the quick response. Your tip got me looking for the right methods. I found calendar.setDateStyleCustomizer to be exactly what I needed. It allows calendar background to be changed conditionally.

      Ideally, the SmartGWT javadoc would be updated to make the zone methods only available in the Timeline class, not Calendar.

      Andrew

      Comment

      Working...
      X