Announcement

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

    Event item width calculation problem in Calendar

    Hello
    i found that sometimes events in a calendar are not rendered correctly. If several events have the same date and time they are sometimes wider than the column in the week view as can be seen on the attached screenshot. As we can also see on the screenshot, sometimes the positioning works properly. I'm just using a very simple read-only calendar with a datasource. However i cannot consistently say how this problem can be reproduced, since moving the events around sometimes fixes the problem. I also tried to have only a simple calendar which only configures the datasource but the problem still occured.

    Code:
        calendar = new Calendar();
        calendar.setDataSource(createDataSource());
        calendar.setCanEditEvents(false);
        calendar.setCanCreateEvents(false);
        calendar.setCanDeleteEvents(false);
        calendar.setAutoFetchData(true);
        calendar.setEventOverlap(true);
        calendar.setTimeFormatter(TimeDisplayFormat.TOSHORT24HOURTIME);
        calendar.setEventWindowStyleField(EventColumnName.EVENT_WINDOW_STYLE);
        calendar.setEventOverlapIdenticalStartTimes(true);
        calendar.setRowHeight(20);
        calendar.setFirstDayOfWeek(1);
    The datasource has the following fields:

    Code:
        DataSourceField idDsField = new DataSourceField("eventId", FieldType.TEXT);
        idDsField.setPrimaryKey(true);
    
        DataSourceField startDateField = new DataSourceDateField("startDate", "Startdate");
        startDateField.setTimeFormatter(TimeDisplayFormat.TOSHORT24HOURTIME);
    
        DataSourceField endDateField = new DataSourceDateField("endDate", "Enddate");
        startDateField.setTimeFormatter(TimeDisplayFormat.TOSHORT24HOURTIME);
    I also attached the debug log from the developer console. The items which are too wide are isc_Canvas_36 and isc_Canvas_37.

    Did anybody have similar problems with the Calendar or could give any hint to why this happens?

    SmartClient Version: 8.2/LGPL Development Only (built 2011-12-05)

    Browser: Internet Explorer 9.0.8112.16421.
    Attached Files

    #2
    We sometimes see this in our calendar, too (see screen shot).
    Attached Files

    Comment


      #3
      Isomorphic, what can we do to nail this? We don't have a reproducible test case because...well, it ain't reliably reproducible. We set up a standalone GWT app with just a basic calendar and sometimes we see the described behavior, sometimes we don't.
      Any tips?

      Comment


        #4
        If you have it happening in a standalone sample, we just need steps that reproduce it reliably enough that we will see it happen in a few trials. Keep in mind, if it's timing-related (like perhaps related to how fast your server code responds) we might never see it when trying to reproduce the problem, so narrow it down as much as you can.

        Comment


          #5
          Puhh, finally... a reproducible test case. The problems arise with short-running events. The threshold seems to be close to < 30min.

          Test setup: create 24 events all 15min long across two days.

          Attached you find the Java code, a screen shot, (and a zipped Eclipse project if I were allowed to upload that).
          You may test with different values for DURATION_IN_MINUTES (line 10) and number of events to create (line 33).
          Attached Files
          Last edited by fhisg; 3 Oct 2012, 10:49.

          Comment


            #6
            Sorry for bumping this again but I'd like to know if this issue now qualifies for being "bug worthy". Based on the material provided can I submit a bug report?

            Comment


              #7
              Yes, we see the issue and an engineer is taking a look - we'll update this thread when there's a fix in place.

              Comment


                #8
                There's an issue with events that are smaller than the calendar.eventSnapGap. We're taking a look at that, but in the meantime, you can make your example work by just setting the eventSnapGap to 15 or less

                Comment


                  #9
                  We've made changes that should address this, along with others that should improve rendering time when there are lots of events, as in your example.

                  These changes will hit nightly builds of 3.1d (SC 8.3d) from 9th October - please let us know if you still see issues.

                  Comment

                  Working...
                  X