Announcement

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

    Calendar "other days" in month view

    Hello, currently per the docs, in the Calendar month view, days that fall in an adjacent month are still shown, and if you click on one of them, the Calendar switches to that month.

    Is it possible to disable this behaviour, while still having them interactive? So that it stays in the current month but opens the event editor for that "other" day?

    #2
    I was trying to modify this behaviour, but I noticed that dayBodyClick isn't called when clicking on those "other days", using this test case:

    Code:
    // using a client-only dataSource so that test data is always relative to the current date
    isc.DataSource.create({
        ID: "eventDS",
        fields:[
            {name:"eventId", primaryKey: true, type: "sequence"},
            {name:"name"},
            {name:"description"},
            {name:"startDate", type: "datetime"},
            {name:"endDate", type: "datetime"}
        ],
        clientOnly: true,
        testData: eventData
    
    });
    
    isc.Calendar.create({
        ID: "eventCalendar",
        startDate: eventData.getDataStartDate(),
        dataSource: eventDS, autoFetchData: true,
        showOtherDays: true,
        dayBodyClick: function (date, events, calendar, view) {
           isc.logEcho('dayBodyClick')
           return calendar.Super("dayBodyClick", arguments);
        }
    });
    even if the docs say:

    Code:
    Not called if the day falls outside the current month and [URL="https://smartclient.com/smartclient-release/isomorphic/system/reference/?id=attr..Calendar.showOtherDays"]showOtherDays[/URL] is false.

    Comment


      #3
      hi Claudio,

      We've made some changes here:

      1) the header and body cell-click handlers will now fire as expected for "otherDay" cells
      2) you can disable "otherDay" click-navigation by setting otherDayClickNavigation to false on your Calendar
      3) you can enable adding "otherDay" events by setting canCreateOtherDayEvents to true on your Calendar

      Please retest with a build dated June 7 or later.

      Comment


        #4
        Hello, thank you very much, I see it working in the 13.1, any chance that you'll port these to 13.0?

        Comment


          #5
          Sure, we'll do it for tomorrow's builds

          Comment

          Working...
          X