Announcement

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

    Month view: clicking empty day shows longEventsLayout and triggers fetch

    SmartClient Version: v13.1p_2026-03-05/AllModules Development Only (built 2026-03-05)

    Hi, I found an issue in a Calendar in my application that I’m not able to reproduce in the showcase.

    Basically, when clicking on a day with no events in the month view, I get the following stack trace:

    Code:
    ISC_Core.js?isc_version=13.1-p20260305.js:68250 Uncaught TypeError: Cannot read properties of undefined (reading 'getTime')
        at cons.getDateColumn (ISC_Calendar.js?isc_version=13.1-p20260305.js:1006:53)
        at cons.getDateLeft (ISC_Calendar.js?isc_version=13.1-p20260305.js:1015:31)
        at cons.updateGhostCanvas (ISC_Calendar.js?isc_version=13.1-p20260305.js:287:38)
        at cons.showGhostCanvas (ISC_Calendar.js?isc_version=13.1-p20260305.js:344:18)
        at Array.callMethod (ISC_Core.js?isc_version=13.1-p20260305.js:15309:66)
        at cons.showGhostCanvas (ISC_Calendar.js?isc_version=13.1-p20260305.js:1062:36)
        at cons.startGhostDragCreate (ISC_Calendar.js?isc_version=13.1-p20260305.js:1167:14)
        at cons.cellMouseDown (ISC_Calendar.js?isc_version=13.1-p20260305.js:7894:14)
        at cons.eval [as cellMouseDown] (eval at isc__makeFunction (ISC_Core.js?isc_version=13.1-p20260305.js:2663:21), <anonymous>:4:127)
        at cons._cellMouseDown (ISC_Grids.js?isc_version=13.1-p20260305.js:13574:37)
        at cons.mouseDown (ISC_Grids.js?isc_version=13.1-p20260305.js:13552:21)
        at cons.handleMouseDown (ISC_Core.js?isc_version=13.1-p20260305.js:108122:37)
        at cons.bubbleEvent (ISC_Core.js?isc_version=13.1-p20260305.js:66415:44)
        at cons.doHandleMouseDown [as _$observed_doHandleMouseDown] (ISC_Core.js?isc_version=13.1-p20260305.js:62316:28)
        at cons.observation [as doHandleMouseDown] (ISC_Core.js?isc_version=13.1-p20260305.js:8659:46)
        at cons.handleMouseDown (ISC_Core.js?isc_version=13.1-p20260305.js:62144:26)
        at cons.dispatch (ISC_Core.js?isc_version=13.1-p20260305.js:68246:30)
        at HTMLDocument.eval (eval at isc__makeFunction (ISC_Core.js?isc_version=13.1-p20260305.js:2663:21), <anonymous>:3:127)
    getDateColumn @ ISC_Calendar.js?isc_version=13.1-p20260305.js:1006
    getDateLeft @ ISC_Calendar.js?isc_version=13.1-p20260305.js:1015
    updateGhostCanvas @ ISC_Calendar.js?isc_version=13.1-p20260305.js:287
    showGhostCanvas @ ISC_Calendar.js?isc_version=13.1-p20260305.js:344
    callMethod @ ISC_Core.js?isc_version=13.1-p20260305.js:15309
    showGhostCanvas @ ISC_Calendar.js?isc_version=13.1-p20260305.js:1062
    startGhostDragCreate @ ISC_Calendar.js?isc_version=13.1-p20260305.js:1167
    cellMouseDown @ ISC_Calendar.js?isc_version=13.1-p20260305.js:7894
    eval @ VM73634:4
    _cellMouseDown @ ISC_Grids.js?isc_version=13.1-p20260305.js:13574
    mouseDown @ ISC_Grids.js?isc_version=13.1-p20260305.js:13552
    handleMouseDown @ ISC_Core.js?isc_version=13.1-p20260305.js:108122
    bubbleEvent @ ISC_Core.js?isc_version=13.1-p20260305.js:66415
    doHandleMouseDown @ ISC_Core.js?isc_version=13.1-p20260305.js:62316
    observation @ ISC_Core.js?isc_version=13.1-p20260305.js:8659
    handleMouseDown @ ISC_Core.js?isc_version=13.1-p20260305.js:62144
    dispatch @ ISC_Core.js?isc_version=13.1-p20260305.js:68246
    eval @ VM73574:3Understand this error
    ISC_Core.js?isc_version=13.1-p20260305.js:68250 Uncaught TypeError: Cannot read properties of null (reading 'getDay')
        at cons._getEventDialogTitle (ISC_Calendar.js?isc_version=13.1-p20260305.js:20032:29)
        at cons.setDate (ISC_Calendar.js?isc_version=13.1-p20260305.js:18484:31)
        at cons.setEvent (ISC_Calendar.js?isc_version=13.1-p20260305.js:18520:18)
        at cons._showEventDialog (ISC_Calendar.js?isc_version=13.1-p20260305.js:19846:12)
        at cons.showEventDialog (ISC_Calendar.js?isc_version=13.1-p20260305.js:19785:10)
        at cons.finishGhostDragCreate (ISC_Calendar.js?isc_version=13.1-p20260305.js:1251:13)
        at cons.cellMouseUp (ISC_Calendar.js?isc_version=13.1-p20260305.js:7918:18)
        at cons.eval [as cellMouseUp] (eval at isc__makeFunction (ISC_Core.js?isc_version=13.1-p20260305.js:2663:21), <anonymous>:4:127)
        at cons.mouseUp (ISC_Grids.js?isc_version=13.1-p20260305.js:13688:35)
        at cons.invokeSuper (ISC_Core.js?isc_version=13.1-p20260305.js:7474:44)
        at cons.Super (ISC_Core.js?isc_version=13.1-p20260305.js:7291:21)
        at cons.mouseUp (ISC_Grids.js?isc_version=13.1-p20260305.js:17834:21)
        at cons.handleMouseUp (ISC_Core.js?isc_version=13.1-p20260305.js:108134:35)
        at cons.bubbleEvent (ISC_Core.js?isc_version=13.1-p20260305.js:66415:44)
        at cons._handleMouseUp (ISC_Core.js?isc_version=13.1-p20260305.js:63030:44)
        at cons.handleMouseUp (ISC_Core.js?isc_version=13.1-p20260305.js:62934:26)
        at cons.dispatch (ISC_Core.js?isc_version=13.1-p20260305.js:68246:30)
        at HTMLDocument.eval (eval at isc__makeFunction (ISC_Core.js?isc_version=13.1-p20260305.js:2663:21), <anonymous>:3:127)
    While trying to reproduce the issue in the showcase, however, I noticed other problems that may or may not be related. With the following test case:

    Code:
    isc.Calendar.create({
        ID:"aCalendar",
        width: "100%",
        height: "100%",
        autoFetchData: false,
        dataSource: "supplyItem",
        currentViewName:"month",
        startDateField:"nextShipment" ,
        implicitCriteria:{_constructor:"AdvancedCriteria", operator:"and",criteria:[{fieldName:"nextShipment", operator:"notNull"}]}
    });
    in the month view, when clicking on a weekday, in addition to the Dialog opening to create the event, a longEventsLayout is displayed that goes from Sunday to the clicked day.
    Also, a fetch is triggered on click (note that autoFetchData is false).

    #2
    Hi Isomorphic I found the catch. To reproduce the error, it’s necessary to use a locale like the Italian one, where the week starts on Monday.

    Comment


      #3
      hi Claudio,

      The problems you mentioned have the same source - the test-case uses an unrelated DataSource, supplyItem, which only has one date-field, and events need start and end dates.

      If you instead start from the id=databoundCalendar/Timeline samples, which use a valid calendar-event DS with start and end date fields, you won't see this crash or the bad ghost positioning.

      We'll address the unsightly crash for today's builds, and perhaps set canCreateEvents to false if there aren't valid date-fields on the DS - but the test is basically invalid as-is.

      Some other fixes will also hit today's builds, from the other on-going thread about this feature.
      Last edited by Isomorphic; Yesterday, 21:48.

      Comment

      Working...
      X