Announcement

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

    Events not displaying immediately on Calendar.

    When we populate a Calendar with a number of events, only the first event appears initially.

    However, if we click Next, followed by Previous, all of the events for the current Month appear.

    I have created a small code snippet that reproduces the issue.
    Simply load the module, only the first event appears, click Next, followed by Previous, then all events appear for the current month.

    Code:
    public class Sandbox2 implements EntryPoint {
        @Override
        public void onModuleLoad() {
    
            Window window = new Window();
            window.setWidth100();
            window.setHeight100();
            Calendar calendar = new Calendar();
            calendar.setShowDayView(Boolean.FALSE);
            calendar.setShowWeekView(Boolean.FALSE);
            calendar.setShowAddEventButton(Boolean.FALSE);
            calendar.setDisableWeekends(Boolean.TRUE);
            calendar.setShowDateChooser(Boolean.FALSE);
            calendar.setCanCreateEvents(Boolean.TRUE);
            calendar.setWidth100();
            calendar.setHeight100();
            window.addItem(calendar);
            window.show();
    
            HashMap<String, String> eventMap = new HashMap<String, String>();
            eventMap.put("2015-07-20", "Event1");
            eventMap.put("2015-07-21", "Event2");
            for (String dateStr : eventMap.keySet()) {
                DateTimeFormat dtf = DateTimeFormat.getFormat("yyyy-MM-dd");
                Date startDate = dtf.parse(dateStr);
                Date endDate = new Date(startDate.getTime() + 1);
                calendar.addEvent(startDate, endDate, eventMap.get(dateStr), null);
            }
        }
    }
    Using:
    FF 24.8.1 ESR
    SmartClient Version: SNAPSHOT_v10.1d_2015-07-16/Pro Deployment (built 2015-07-16)


    ---
    On a side note, it was working with the following build (this started when upgrading to 5.1).
    SmartClient Version: v10.0p_2015-06-11/Pro Deployment (built 2015-06-11)

    #2
    We have a bunch of fixes, for this and other issues, in 5.0 that haven't made it into 5.1 nightlies yet - they should hit in the next day or so - we'll let you know.

    Comment


      #3
      Please retest with a build dated July 23 or later and let us know if you still have issues.

      Comment


        #4
        The problem still persists with July 23 build.
        Regards

        Comment


          #5
          In 5.1, there was a check that prevented refreshEvents() from updating cell HTML in the monthView, unless the month had changed. That was incorrect and has been removed for builds dated July 26 and later.

          Comment


            #6
            Working again now. Thanks

            Comment


              #7
              Still missing in July 30th build.

              SGWT 5.0p 07/30/2015 10:24
              GWT 2.3
              Chrome 44.0.2403.125 m
              Code:
              @Override
              public void onModuleLoad() {
              	DateUtil.setDateInputFormat("YMD");
              	DateUtil.setDefaultDisplayTimezone("-08:00");
              	DateUtil.setShortDateDisplayFormatter(DateUtil.TOJAPANSHORTDATE);
              	DateUtil.setShortDatetimeDisplayFormatter(DateUtil.TOJAPANSHORTDATETIME);
              	new VLayout(4){{
              		setWidth(600);
              		setHeight(400);
              		Calendar calendar = new Calendar();
              		CalendarEvent[] data = new CalendarEvent[]{new CalendarEvent(1, "Event-1", "Event-1",
              				new Date(2015 - 1900, 7, 1, 10, 0, 0), new Date(2015 - 1900, 7, 1, 11, 0, 0))};
              		calendar.setData(data );
              		addMember(calendar);
              		addMember(new Canvas(){{
              			setContents("Version: " + Version.getVersion() + " Build date: " + Version.getBuildDate());
              			setAutoHeight();
              		}});
              	}}.show();
              }
              Seems to work when setDefaultTimezone is not specified.
              Attached Files
              Last edited by pghosh; 30th Jul 2015, 14:22.

              Comment


                #8
                This is a separate issue, related to your defaultDisplayTimezone - we'll take a look at that, but please confirm this works as you expect without a custom timezone.

                Comment


                  #9
                  Isomorphic,
                  I already confirmed earlier, the new issue was reported by a different user, "pghosh".
                  Regards

                  Comment


                    #10
                    Originally posted by Isomorphic View Post
                    This is a separate issue, related to your defaultDisplayTimezone - we'll take a look at that, but please confirm this works as you expect without a custom timezone.
                    Should I start a new thread for that? Seemed to be related. I also noticed that the Calendar widget does not honor the specified default timezone instead it always uses the browsers timezone.

                    Comment


                      #11
                      Originally posted by Isomorphic View Post
                      This is a separate issue, related to your defaultDisplayTimezone - we'll take a look at that, but please confirm this works as you expect without a custom timezone.
                      Any progress on this issue?

                      Comment


                        #12
                        We asked that you confirm that the Calendar is working if you remove the defaultDisplayTimezone - can you confirm that? We noticed you posted something about starting a new thread, but it wasn't clear if you were confirming the cause of the issue.

                        Comment


                          #13
                          Yes it works fine if I remove defaultDisplayTimezone.

                          Comment


                            #14
                            We don't actually document full support for a display timezone in Calendars, but there are indeed some issues in this area - we'll look at completing such support in the comiong days and update here when we have more information.

                            Comment


                              #15
                              Is there an update on timezone support for calendars? Our clients are getting anxious.

                              Comment

                              Working...
                              X