Announcement

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

    Calendar eventCount not displaying correct number after upgrade to v12.0p.

    Hi Isomorphic,

    The eventCount you are using for the + N more... in the Calendar appears to be off by 1 now after upgrading from "v10.1p_2017-08-10/Pro Deployment (built 2017-08-10)" to "v12.0p_2018-09-21/Pro Deployment (built 2018-09-21)".

    Please see example below, including screenshot.

    Regards

    Click image for larger version  Name:	eventcount.png Views:	1 Size:	2.5 KB ID:	255204

    Code:
    public class Sandbox8 implements EntryPoint {
    
        private static final String MORE_EVENTS_AUTO_CHILD_PROPERTY = "monthMoreEventsMenu";
        private static Date TODAY = new Date();
        private static int YEAR = TODAY.getYear();
        private static int MONTH = TODAY.getMonth();
        private static int START = TODAY.getDate() - TODAY.getDay();
    
        @Override
        public void onModuleLoad() {
            Calendar calendar = initCalendar();
            calendar.setWidth100();
            calendar.setHeight100();
            calendar.show();
    
            addCalendarEvents(calendar);
        };
    
        private Calendar initCalendar() {
            Calendar calendar = new Calendar();
            calendar.setShowDayView(Boolean.FALSE);
            calendar.setShowWeekView(Boolean.FALSE);
            calendar.setShowAddEventButton(Boolean.FALSE);
            calendar.setCanCreateEvents(Boolean.FALSE);
            calendar.setShowDatePickerButton(Boolean.FALSE);
            calendar.setShowDateChooser(Boolean.FALSE);
            calendar.setDisableWeekends(Boolean.FALSE);
            Menu menuProperties = new Menu();
            menuProperties.setMaxHeight(250);
            calendar.setAutoChildProperties(MORE_EVENTS_AUTO_CHILD_PROPERTY, menuProperties);
            return calendar;
        }
    
        private void addCalendarEvents(Calendar calendar) {
            for (int i = 0; i < 12; i++) {
                calendar.addEvent(new Date(YEAR, MONTH, START + 2, i, 00, 0), new Date(YEAR, MONTH, START + 2, i, 00, 0), "Meeting " + i + ":00", null);
            }
            calendar.markForRedraw();
        }

    #2
    Hi Isomorphic,

    Do you have an update on this one yet?

    Regards

    Comment


      #3
      Apologies - we neglected to update the thread, but the issue was fixed on September 26 - you can retest with the latest build.

      Comment

      Working...
      X