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; 6 Mar 2026, 21:48.

      Comment


        #4
        SmartClient Version: v13.1p_2026-03-07/Enterprise Development Only (built 2026-03-07)

        Hi, I still see the crash even when an endDate field is used:

        Code:
        isc.Calendar.create({
            ID:"aCalendar",
            width: "100%",
            height: "100%",
            autoFetchData: false,
            dataSource: "supplyItem",
            currentViewName:"month",
            startDateField:"nextShipment" ,
            endDateField:"endDate",
            descriptionField:"itemName",
            implicitCriteria:{_constructor:"AdvancedCriteria", operator:"and",criteria:[{fieldName:"nextShipment", operator:"notNull"}]}
        });
        Code:
        <DataSource isSampleDS="true"
            ID="supplyItem"
            serverType="sql"
            tableName="supplyItem"
            titleField="itemName"
            testFileName="/examples/shared/ds/test_data/supplyItem.data.xml"
            dbImportFileName="/examples/shared/ds/test_data/supplyItemLarge.data.xml"
        >
            <fields>
                <field name="itemID"      type="sequence" hidden="true"       primaryKey="true"/>
                <field name="itemName"    type="text"     title="Item"        length="128"       required="true"/>
                <field name="SKU"         type="text"     title="SKU"         length="10"        required="true"/>
                <field name="description" type="text"     title="Description" length="2000"/>
                <field name="category"    type="text"     title="Category"    length="128"       required="true"
                       foreignKey="supplyCategory.categoryName"/>
                <field name="units"       type="enum"     title="Units"       length="5">
                    <valueMap>
                        <value>Roll</value>
                        <value>Ea</value>
                        <value>Pkt</value>
                        <value>Set</value>
                        <value>Tube</value>
                        <value>Pad</value>
                        <value>Ream</value>
                        <value>Tin</value>
                        <value>Bag</value>
                        <value>Ctn</value>
                        <value>Box</value>
                    </valueMap>
                </field>
                <field name="unitCost"    type="float"    title="Unit Cost"   required="true">
                    <validators>
                        <validator type="floatRange" min="0" errorMessage="Please enter a valid (positive) cost"/>
                        <validator type="floatPrecision" precision="2" errorMessage="The maximum allowed precision is 2"/>
                    </validators>
                </field>
                <field name="inStock"   type="boolean"  title="In Stock"/>
                <field name="nextShipment"  type="datetime" title="Next Shipment"/>
                <field name="endDate"  type="datetime" customSelectExpression="TIMESTAMPADD(SQL_TSI_HOUR, 1, nextShipment)"/>
            </fields>
        </DataSource>
        Code:
        ISC_Core.js?isc_version=v13.1p_2026-03-07.js:11305 Uncaught TypeError: Cannot read properties of undefined (reading 'getTime')
            at _3.getDateColumn (ISC_Calendar.js?isc_version=v13.1p_2026-03-07.js:71:172)
            at _3.getDateLeft (ISC_Calendar.js?isc_version=v13.1p_2026-03-07.js:72:49)
            at _3.updateGhostCanvas (ISC_Calendar.js?isc_version=v13.1p_2026-03-07.js:31:81)
            at _3.showGhostCanvas (ISC_Calendar.js?isc_version=v13.1p_2026-03-07.js:36:69)
            at Array.isc_Arra_callMethod [as callMethod] (ISC_Core.js?isc_version=v13.1p_2026-03-07.js:1401:173)
            at _3.isc_CalendarView_showGhostCanvas [as showGhostCanvas] (ISC_Calendar.js?isc_version=v13.1p_2026-03-07.js:127:437)
            at _3.isc_CalendarView_startGhostDragCreate [as startGhostDragCreate] (ISC_Calendar.js?isc_version=v13.1p_2026-03-07.js:129:468)
            at _3.isc_MonthSchedule_cellMouseDown [as cellMouseDown] (ISC_Calendar.js?isc_version=v13.1p_2026-03-07.js:451:157)
            at _3.eval [as cellMouseDown] (eval at isc__makeFunction (ISC_Core.js?isc_version=v13.1p_2026-03-07.js:123:1135), <anonymous>:4:115)
            at _3.isc_GridRenderer__cellMouseDown [as $29w] (ISC_Grids.js?isc_version=v13.1p_2026-03-07.js:667:30)
            at _3.isc_GridRenderer_mouseDown [as mouseDown] (ISC_Grids.js?isc_version=v13.1p_2026-03-07.js:666:134)
            at _3.isc_Canvas_handleMouseDown [as handleMouseDown] (ISC_Core.js?isc_version=v13.1p_2026-03-07.js:16895:111)
            at _3.isc_c_EventHandler_bubbleEvent [as bubbleEvent] (ISC_Core.js?isc_version=v13.1p_2026-03-07.js:10532:12)
            at _3.isc_c_EventHandler_doHandleMouseDown [as doHandleMouseDown] (ISC_Core.js?isc_version=v13.1p_2026-03-07.js:8698:12)
            at _3.isc_c_EventHandler_handleMouseDown [as handleMouseDown] (ISC_Core.js?isc_version=v13.1p_2026-03-07.js:8620:11)
            at _3.isc_c_EventHandler_dispatch [as dispatch] (ISC_Core.js?isc_version=v13.1p_2026-03-07.js:11303:7)
            at HTMLDocument.eval (eval at isc__makeFunction (ISC_Core.js?isc_version=v13.1p_2026-03-07.js:123:1135), <anonymous>:3:123)
        and now it doesn't seem to require the italian locale.
        Last edited by claudiobosticco; 7 Mar 2026, 05:26.

        Comment


          #5
          Yes, apologies, the fixes didn't hit 13.1 builds in time for today's builds.

          But note that your test-case is just wrong - it wouldn't be expected to work in any previous version or any current one. There is only one date-field in the DS.

          Comment


            #6
            Originally posted by Isomorphic View Post
            But note that your test-case is just wrong - it wouldn't be expected to work in any previous version or any current one. There is only one date-field in the DS.
            Hi, please note that in post #4 I've posted an updated test case, with an endDate field in both dataSource and Calendar.

            Comment


              #7
              Could you perhaps post a sample that does not rely on an unrelated table? SupplyItem has no relation at all to calendars. Use the task datasource if you want to report issues with calendars, or provide a proper calendar-event DS.

              Comment


                #8
                Thanks for the suggestion about the tasks dataSource. From a quick test, it doesn’t seem to do it.

                However, this seems odd to me: the test case in post #4 didn’t appear to have anything illegal - there are two datetime fields in the dataSource:

                Code:
                <field name="nextShipment" type="datetime" title="Next Shipment"/>
                <field name="endDate" type="datetime" customSelectExpression="TIMESTAMPADD(SQL_TSI_HOUR, 1, nextShipment)"/>
                which are used for the Calendar:

                Code:
                startDateField:"nextShipment",
                endDateField:"endDate"
                am I missing something obvious?

                Comment


                  #9
                  hi Claudio - when you say "it doesn't seem to do it", what do you mean by that?

                  It kind of seems like you're trying to force a situation that you already have in your code. You're trying to forcibly inject a different field into a built-in test DS right?

                  Can you please just show us the actual code that fails?

                  Comment


                    #10
                    Just to follow up here Claudio - your proposed addition of a field didn't add any values into that field in the data. It was a nonsense addition, without corresponding values on records.

                    If you find bugs, It will really be best to just provide a calendar with the data you expect it to have, and explain why it doesn't have it. Pointing a calendar at supplyItem, which has nothing at all to do with calendar events, is really not the way to go.

                    Comment


                      #11
                      Hi, sorry for the confusion.
                      The issue is that the code causing the problem in my application was extremely basic, and the previous test cases seemed to reproduce it adequately.

                      However, I hadn’t actually realized what the trigger for the bug was; now I hope I’ve figured it out.

                      The problem seems to be caused by the startDateField having a different name than the default, which is why it didn’t happen with the tasks dataSource.
                      I’ve now tried changing the name in the dataSource in this way:

                      Code:
                      <DataSource isSampleDS="true"
                          ID="tasks"
                          serverType="sql"
                          tableName="tasks"
                          testFileName="/examples/shared/ds/test_data/tasks.data.xml"
                      >
                          <fields>
                              <field name="taskId" type="sequence" hidden="true" primaryKey="true" />
                              <field name="name" type="text" title="Name" required="true" />
                              <field name="description" type="text" title="Description" />
                              <field name="foo" nativeName="startDate" type="datetime" title="Start Date" required="true" />
                              <field name="endDate" type="datetime" title="End Date" required="true" />
                              <field name="lane" type="text" title="Lane" required="true" />
                              <field name="eventWindowStyle" type="text" />
                              <field name="canEdit" type="boolean" hidden="true" />
                          </fields>
                      </DataSource>
                      and the test case fails, in two different ways.
                      In the first case simply by running it:
                      Code:
                      var _calStart = isc.DateUtil.getStartOf(new Date(2020, 6, 5), "W");
                      var _calEnd = _calStart.duplicate();
                      _calEnd.setDate(_calEnd.getDate() + 20);
                      
                      isc.Calendar.create({
                          ID: "testCal",
                          startDate: _calStart,
                          endDate: _calEnd,
                          width: "100%",
                          height: "100%",
                          startDateField: "foo",
                          currentViewName: "month",
                          autoFetchData: true,
                          dataSource: "tasks"
                      })
                      Code:
                      18:44:56.131:XRP4:WARN:Log:TypeError: Cannot read properties of undefined (reading 'getTime')
                      Stack from error.stack:
                          _3.getDateColumn(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout] @ ISC_Calendar.js:71:172
                          _3.getDateLeft(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout] @ ISC_Calendar.js:72:49
                          _3.redrawEvents(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout] @ ISC_Calendar.js:63:597
                          _3.refreshEvents(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout] @ ISC_Calendar.js:56:24
                          MonthSchedule.refreshLongEvents(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Calendar.js:428:1335
                          MonthSchedule.refreshEvents(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Calendar.js:447:113
                          Calendar.dataChanged(<no args: exited>) on [Calendar ID:testCal] @ ISC_Calendar.js:660:169
                          _3.eval(<no args: exited>) on [ResultSet ID:isc_ResultSet_1 (dataSource: tasks, created by: testCal)] @ [no file]:4:10
                          _3.thunk(<no args: exited>) on [Calendar ID:testCal] @ ISC_Core.js:714:28
                          _3.observation(<no args: exited>) on [ResultSet ID:isc_ResultSet_1 (dataSource: tasks, created by: testCal)] @ ISC_Core.js:708:382
                          ResultSet._doneChangingData(<no args: exited>) on [ResultSet ID:isc_ResultSet_1 (dataSource: tasks, created by: testCal)] @ ISC_DataBinding.js:12036:29
                          ResultSet._handleNewData(<no args: exited>) on [ResultSet ID:isc_ResultSet_1 (dataSource: tasks, created by: testCal)] @ ISC_DataBinding.js:11906:6
                          _3.<anonymous>(<no args: exited>) on [ResultSet ID:isc_ResultSet_1 (dataSource: tasks, created by: testCal)] @ ISC_DataBinding.js:11899:103
                          [c]Class.fireCallback(_1=>Obj, _2=>"dsResponse,data,dsRequest", _3=>Array[3], _4=>[DataSource ID:tasks], _5=>undef) on [Class DataSource] @ ISC_Core.js:616:102
                          Class.fireCallback(_1=>Obj, _2=>"dsResponse,data,dsRequest", _3=>Array[3], _4=>undef) on [DataSource ID:tasks] @ ISC_Core.js:855:89
                          DataSource.fireResponseCallbacks(_1=>Obj, _2=>Obj, _3=>Obj, _4=>Obj) on [DataSource ID:tasks] @ ISC_DataBinding.js:4210:9
                          DataSource._completeResponseProcessing(_1=>Array[24], _2=>Obj, _3=>Obj, _4=>Obj, _5=>Obj) on [DataSource ID:tasks] @ ISC_DataBinding.js:4177:6
                          DataSource._handleSCServerReply(_1=>Obj, _2=>Array[24], _3=>Obj) on [DataSource ID:tasks] @ ISC_DataBinding.js:13848:6
                          [c]Class.fireCallback(<no args: recursion>) on [Class RPCManager] @ ISC_Core.js:616:102
                          Class.fireCallback(<no args: recursion>) on [RPCManager ID:builtinApplication] @ ISC_Core.js:855:89
                          [c]RPCManager.fireReplyCallback(_1=>Obj, _2=>Obj, _3=>Obj, _4=>Array[24]) on [Class RPCManager] @ ISC_DataBinding.js:11362:77
                          [c]RPCManager.fireReplyCallbacks(_1=>Obj, _2=>Obj) on [Class RPCManager] @ ISC_DataBinding.js:11368:120
                          [c]RPCManager.completeOperationReply(_1=>Obj, _2=>Obj) on [Class RPCManager] @ ISC_DataBinding.js:11340:6
                          [c]RPCManager.performOperationReply(_1=>Obj, _2=>Obj) on [Class RPCManager] @ ISC_DataBinding.js:11336:13
                          RPCManager._performTransactionReply(_1=>19) on [Class RPCManager] @ ISC_DataBinding.js:11177:26
                          [c]RPCManager.performTransactionReply(_1=>19, _2=>"//isc_RPCResponseStart-->[{affectedRows:..."[4226], _3=>undef) on [Class RPCManager] @ ISC_DataBinding.js:11087:20
                          null.eval(transactionNum=>19, results=>[object XMLHttpRequest], wd=>undef) @ [no file]:3:16
                          [c]Class.fireCallback(<no args: recursion>) on [Class Comm] @ ISC_Core.js:616:102
                          [c]Comm.performXmlTransactionReply(_1=>19, _2=>[object XMLHttpRequest]) on [Class Comm] @ ISC_Core.js:7247:27
                          null.eval(xmlHttpRequest=>[object XMLHttpRequest]) @ [no file]:3:10
                          [c]Class.fireCallback(<no args: recursion>) on [Class Class] @ ISC_Core.js:616:102
                          Comm._fireXMLCallback(_1=>[object XMLHttpRequest], _2=>"isc.Comm.performXmlTransactionReply(19, ..."[55], _3=>undef) on [Class Comm] @ ISC_Core.js:7196:440
                          XMLHttpRequest._15() @ ISC_Core.js:7221:135
                      
                      18:44:56.141:TMR6:WARN:Canvas:testCal_monthView_longEventsLayout:Attempt to remove child: [EventCanvas ID:testCal_monthView_longEventsLayout_canvas] from Canvas that is not its parent
                      18:44:56.141:TMR6:WARN:Log:TypeError: Cannot read properties of undefined (reading 'getTime')
                      Stack from error.stack:
                          _3.getDateColumn(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout] @ ISC_Calendar.js:71:172
                          _3.getDateLeft(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout] @ ISC_Calendar.js:72:49
                          _3.redrawEvents(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout] @ ISC_Calendar.js:63:597
                          _3.refreshEvents(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout] @ ISC_Calendar.js:56:24
                          MonthSchedule.refreshLongEvents(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Calendar.js:428:1335
                          MonthSchedule.resized(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Calendar.js:429:7
                          ListGrid.updateRecordComponents(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Grids.js:1846:35
                          GridBody.redraw(<no args: exited>) on [MonthScheduleBody ID:testCal_monthView_body] @ ISC_Grids.js:842:36
                          Canvas.redrawChildren(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Core.js:15070:334
                          Canvas._updateHTML(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Core.js:15052:30
                          Canvas.redraw(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Core.js:15041:186
                          [c]Class.invokeSuper(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Core.js:583:15
                          ListGrid.redraw(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Grids.js:1170:6
                          [c]Canvas.clearRedrawQueue(<no args: exited>) on [Class Canvas] @ ISC_Core.js:17845:110
                          [c]Class.fireCallback(_1=>Obj, _2=>null, _3=>null, _4=>null, _5=>true) on [Class Timer] @ ISC_Core.js:616:102
                          Timer._fireTimeout(_1=>"$ir15407", _2=>15430, _3=>undef) on [Class Timer] @ ISC_Core.js:7352:6
                          null.<anonymous>() @ ISC_Core.js:7345:40
                      and in the second case (with autoFetchData: false) you need to click on a day:
                      Code:
                      var _calStart = isc.DateUtil.getStartOf(new Date(2020, 6, 5), "W");
                      var _calEnd = _calStart.duplicate();
                      _calEnd.setDate(_calEnd.getDate() + 20);
                      
                      isc.Calendar.create({
                          ID: "testCal",
                          startDate: _calStart,
                          endDate: _calEnd,
                          width: "100%",
                          height: "100%",
                          startDateField: "foo",
                          currentViewName: "month",
                          autoFetchData: false,
                          dataSource: "tasks"
                      })
                      Code:
                      18:45:29.297:MDN2:WARN:Log:TypeError: Cannot read properties of undefined (reading 'getTime')
                      Stack from error.stack:
                          _3.getDateColumn(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout_isc_OID_34] @ ISC_Calendar.js:71:172
                          _3.getDateLeft(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout_isc_OID_34] @ ISC_Calendar.js:72:49
                          _3.updateGhostCanvas(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout_isc_OID_34] @ ISC_Calendar.js:31:81
                          _3.showGhostCanvas(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout_isc_OID_34] @ ISC_Calendar.js:36:69
                          Arra.callMethod(<no args: exited>) @ ISC_Core.js:1401:173
                          CalendarView.showGhostCanvas(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Calendar.js:127:437
                          CalendarView.startGhostDragCreate(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Calendar.js:129:468
                          MonthSchedule.cellMouseDown(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Calendar.js:451:157
                          _3.eval(<no args: exited>) on [MonthScheduleBody ID:testCal_monthView_body] @ [no file]:4:115
                          GridRenderer._cellMouseDown(<no args: exited>) on [MonthScheduleBody ID:testCal_monthView_body] @ ISC_Grids.js:667:30
                          GridRenderer.mouseDown(<no args: exited>) on [MonthScheduleBody ID:testCal_monthView_body] @ ISC_Grids.js:666:134
                          Canvas.handleMouseDown(<no args: exited>) on [MonthScheduleBody ID:testCal_monthView_body] @ ISC_Core.js:16895:111
                          [c]EventHandler.bubbleEvent(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:10532:12
                          EventHandler.doHandleMouseDown(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:8698:12
                          _3.observation(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:708:161
                          [c]EventHandler.handleMouseDown(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:8620:11
                          [c]EventHandler.dispatch(_1=>[c]EventHandler.handleMouseDown(), _2=>[object MouseEvent]) on [Class EventHandler] @ ISC_Core.js:11303:7
                          HTMLDocument.eval(event=>[object MouseEvent]) @ [no file]:3:123
                      
                      18:45:29.432:TMR2:WARN:TextItem:isc_TextItem_4[name]:Attempting to apply event handlers to this item. Unable to get a pointer to this item's focus element
                      18:45:29.444:TMR8:WARN:TextItem:isc_TextItem_4[name]:Attempting to apply event handlers to this item. Unable to get a pointer to this item's focus element
                      18:45:29.448:TMR9:WARN:TextItem:isc_TextItem_4[name]:Attempting to apply event handlers to this item. Unable to get a pointer to this item's focus element
                      18:45:29.452:XRP2:WARN:Log:TypeError: Cannot read properties of undefined (reading 'getTime')
                      Stack from error.stack:
                          _3.getDateColumn(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout] @ ISC_Calendar.js:71:172
                          _3.getDateLeft(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout] @ ISC_Calendar.js:72:49
                          _3.redrawEvents(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout] @ ISC_Calendar.js:63:597
                          _3.refreshEvents(<no args: exited>) on [Canvas ID:testCal_monthView_longEventsLayout] @ ISC_Calendar.js:56:24
                          MonthSchedule.refreshLongEvents(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Calendar.js:428:1335
                          MonthSchedule.refreshEvents(<no args: exited>) on [MonthSchedule ID:testCal_monthView] @ ISC_Calendar.js:447:113
                          Calendar.dataChanged(<no args: exited>) on [Calendar ID:testCal] @ ISC_Calendar.js:660:169
                          _3.eval(<no args: exited>) on [ResultSet ID:isc_ResultSet_1 (dataSource: tasks, created by: testCal)] @ [no file]:4:10
                          _3.thunk(<no args: exited>) on [Calendar ID:testCal] @ ISC_Core.js:714:28
                          _3.observation(<no args: exited>) on [ResultSet ID:isc_ResultSet_1 (dataSource: tasks, created by: testCal)] @ ISC_Core.js:708:382
                          ResultSet._doneChangingData(<no args: exited>) on [ResultSet ID:isc_ResultSet_1 (dataSource: tasks, created by: testCal)] @ ISC_DataBinding.js:12036:29
                          ResultSet._handleNewData(<no args: exited>) on [ResultSet ID:isc_ResultSet_1 (dataSource: tasks, created by: testCal)] @ ISC_DataBinding.js:11906:6
                          _3.<anonymous>(<no args: exited>) on [ResultSet ID:isc_ResultSet_1 (dataSource: tasks, created by: testCal)] @ ISC_DataBinding.js:11899:103
                          [c]Class.fireCallback(_1=>Obj, _2=>"dsResponse,data,dsRequest", _3=>Array[3], _4=>[DataSource ID:tasks], _5=>undef) on [Class DataSource] @ ISC_Core.js:616:102
                          Class.fireCallback(_1=>Obj, _2=>"dsResponse,data,dsRequest", _3=>Array[3], _4=>undef) on [DataSource ID:tasks] @ ISC_Core.js:855:89
                          DataSource.fireResponseCallbacks(_1=>Obj, _2=>Obj, _3=>Obj, _4=>Obj) on [DataSource ID:tasks] @ ISC_DataBinding.js:4210:9
                          DataSource._completeResponseProcessing(_1=>Array[24], _2=>Obj, _3=>Obj, _4=>Obj, _5=>Obj) on [DataSource ID:tasks] @ ISC_DataBinding.js:4177:6
                          DataSource._handleSCServerReply(_1=>Obj, _2=>Array[24], _3=>Obj) on [DataSource ID:tasks] @ ISC_DataBinding.js:13848:6
                          [c]Class.fireCallback(<no args: recursion>) on [Class RPCManager] @ ISC_Core.js:616:102
                          Class.fireCallback(<no args: recursion>) on [RPCManager ID:builtinApplication] @ ISC_Core.js:855:89
                          [c]RPCManager.fireReplyCallback(_1=>Obj, _2=>Obj, _3=>Obj, _4=>Array[24]) on [Class RPCManager] @ ISC_DataBinding.js:11362:77
                          [c]RPCManager.fireReplyCallbacks(_1=>Obj, _2=>Obj) on [Class RPCManager] @ ISC_DataBinding.js:11368:120
                          [c]RPCManager.completeOperationReply(_1=>Obj, _2=>Obj) on [Class RPCManager] @ ISC_DataBinding.js:11340:6
                          [c]RPCManager.performOperationReply(_1=>Obj, _2=>Obj) on [Class RPCManager] @ ISC_DataBinding.js:11336:13
                          RPCManager._performTransactionReply(_1=>20) on [Class RPCManager] @ ISC_DataBinding.js:11177:26
                          [c]RPCManager.performTransactionReply(_1=>20, _2=>"//isc_RPCResponseStart-->[{affectedRows:..."[4226], _3=>undef) on [Class RPCManager] @ ISC_DataBinding.js:11087:20
                          null.eval(transactionNum=>20, results=>[object XMLHttpRequest], wd=>undef) @ [no file]:3:16
                          [c]Class.fireCallback(<no args: recursion>) on [Class Comm] @ ISC_Core.js:616:102
                          [c]Comm.performXmlTransactionReply(_1=>20, _2=>[object XMLHttpRequest]) on [Class Comm] @ ISC_Core.js:7247:27
                          null.eval(xmlHttpRequest=>[object XMLHttpRequest]) @ [no file]:3:10
                          [c]Class.fireCallback(<no args: recursion>) on [Class Class] @ ISC_Core.js:616:102
                          Comm._fireXMLCallback(_1=>[object XMLHttpRequest], _2=>"isc.Comm.performXmlTransactionReply(20, ..."[55], _3=>undef) on [Class Comm] @ ISC_Core.js:7196:440
                          XMLHttpRequest._15() @ ISC_Core.js:7221:135
                      
                      18:45:29.453:TMR8:WARN:TextItem:isc_TextItem_4[name]:Attempting to apply event handlers to this item. Unable to get a pointer to this item's focus element
                      18:45:29.454:TMR5:WARN:TextItem:isc_TextItem_4[name]:Attempting to apply event handlers to this item. Unable to get a pointer to this item's focus element
                      18:45:29.455:TMR2:WARN:TextItem:isc_TextItem_4[name]:Attempting to apply event handlers to this item. Unable to get a pointer to this item's focus element
                      ...

                      Comment


                        #12
                        Great, thanks, we see the issues now - we'll get them addressed today and let you know when they're fixed.

                        Comment


                          #13
                          hi Claudio,

                          We've fixed these issues in 15.0 and will port them to 13.1 today.

                          There were a few categories of error:

                          1. hard-coded use of the default "startDate" and "endDate" field-names - crashes with non-standard start/endDateField
                          2. code-paths that assumed events had valid dates and made direct method calls, like event[calendar.startDateField].getTime() - crashes with missing event-dates
                          3. mouse-related date-detection issues for longEvents when firstDayOfWeek was non-zero - various visible misbehaviors of the ghost canvas

                          We've added some autotests to exercise firstDayOfWeek with longEvents, and also modified the internal autoDetectFieldNames() path, so that is sets canCreateEvents to false if start/end date fields aren't valid/can't be detected, and logs about it.

                          Please retest with tomorrow's builds, dated March 9 or later. Note that those builds will also address most of the matters raised by Blama in the related thread. We'll update there separately.

                          Comment

                          Working...
                          X