Could you debug to see which exact line in _onDataLoaded method throws this error? It seems the error is because trying to access an undefined variable.
Could you check whats the value in startRowIndex and dayIndex?also in which week you get this error? If you dont pass any events, will this error happen?
TypeError: Cannot read property 'NaN' of undefined at Object.ctrl._onDataLoaded (http://localhost:8100/lib/ionic-calendar/dist/js/calendar-tpls.min.js:1:20755) at Object.self.rangeChanged (http://localhost:8100/lib/ionic-calendar/dist/js/calendar-tpls.min.js:1:6683) at Object.self.refreshView (http://localhost:8100/lib/ionic-calendar/dist/js/calendar-tpls.min.js:1:5891) at link (http://localhost:8100/lib/ionic-calendar/dist/js/calendar-tpls.min.js:1:21922) at invokeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:22993:9) at nodeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:22392:11) at delayedNodeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:22750:11) at compositeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:21703:13) at publicLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:21583:30) at boundTranscludeFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:21720:16)
my change mode function is
Html code:
Could you debug to see which exact line in _onDataLoaded method throws this error? It seems the error is because trying to access an undefined variable.
eventSet=rows[startRowIndex][dayIndex].events
At dayIndex it is showing error.. Below is the html I'm using for viewing caledar
<calendar ng-model="calendar.currentDate" calendar-mode="calendar.mode" event-source="calendar.eventSource" range-changed="reloadSource(startTime, endTime)" event-selected="onEventSelected(event)" title-changed="onViewTitleChanged(title)" time-selected="onTimeSelected(selectedTime, events)" monthview-event-detail-template-url="monthviewEventDetailTemplateUrl" step="30" ></calendar>
Could you check whats the value in startRowIndex and dayIndex?also in which week you get this error? If you dont pass any events, will this error happen?
Both startRowIndex and dayIndex are coming as NaN.. and the error is not happening if i'm not passing any event.
Below code is my event generation code..
Could u check if all events you passed in having valid startTime and endTime?
Thankyou for your time @twinssbc .. It is the start time and end time problem. Thankyou for guiding