Hello, when I use calendar.zones in combination with the property
startDateField :
wich has a different name in the dataSource I receive an error: "ISC_Calendar.js:213 Uncaught TypeError: Cannot read property 'getTime' of undefined"
If I don:t set the property I don't receive the error.
Kind regards
Paul
1,) SmartClient:v11.0p_2016-07-19
2.)Browser:chrome Version 52.0.2743.116 m
5.)Stack Trace:Stack from error.stack:
CalendarView.drawZones(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:213:173
CalendarView.refreshVisibleEvents(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:194:22
CalendarView.refreshEvents(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:228:53
[c]Class.invokeSuper(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Core.js:294:93
[c]Class.Super(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Core.js:286:170
TimelineView.refreshEvents(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:367:312
Calendar.refreshSelectedView(<no args: exited>) on [Timeline ID:timeline] @ ISC_Calendar.js:471:1408
Calendar.dataChanged(<no args: exited>) on [Timeline ID:timeline] @ ISC_Calendar.js:471:161
CalendarView._refreshData(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:229:246
TimelineView._rebuild(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:367:163
TimelineView.setTimelineRange(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:375:225
Calendar.setChosenDate(<no args: exited>) on [Timeline ID:timeline] @ ISC_Calendar.js:536:46
Calendar.draw(<no args: exited>) on [Timeline ID:timeline] @ ISC_Calendar.js:548:41
Canvas.init(<no args: exited>) on [Timeline ID:timeline] @ ISC_Core.js:2160:91
Class.completeCreation(<no args: exited>) on [Timeline ID:timeline] @ ISC_Core.js:344:6
[c]Class.create(<no args: exited>) on [Class Timeline] @ ISC_Core.js:232:1837
<anonymous>(<no args: exited>) @ tlz.p:61:14
7.) Test Case
var developers = [
{ name: "charlesMadigen", title: "Charles Madigen", devGroup: "Managers" },
{ name: "tamaraKane", title: "Tamara Kane", devGroup: "Developers" },
{ name: "darcyFeeney", title: "Darcy Feeney", devGroup: "Managers" },
{ name: "kaiKong", title: "Kai Kong", devGroup: "Developers" },
{ name: "shellyFewel", title: "Shelly Fewel", devGroup: "Managers" },
{ name: "garretMonroe", title: "Garret Monroe", devGroup: "Developers" }
];
isc.RestDataSource.create({
ID: "tasks",
tableName: "tasks",
dataURL:"termink_pl.p",
dataProtocol: "postParams",
fields:{
eventId:{type:"datetime",title:"start"},
epkDatumAb:{type:"datetime", title:"Start"},
endDate:{type:"datetime",title:"end"},
lane:{type:"text",title:"Grp. Bezeichnung"},
canEdit:{type:"text",title:"Sortierwert"}
}
})
var _calStart = isc.DateUtil.getStartOf(new Date(2012, 6, 5), "W");
var _calEnd = _calStart.duplicate();
_calEnd.setDate(_calEnd.getDate() + 20);
isc.Timeline.create({
ID: "timeline",
height: 451,
startDate: _calStart,
endDate: _calEnd,
//dataSource: "tasks",
lanes: developers,
startDateField : "epkDatumAb",
headerLevels: [ { unit: "week" }, { unit: "day" } ],
laneFields: [ { name: "title", title: "Developer", minWidth: 120, autoFitWidth: true } ],
canEditLane: true,
showEventDescriptions: false,
columnsPerPage: 5,
disableWeekends: false,
laneEventPadding: 2,
eventSnapGap: 360, // 6-hour snapGap
showZones: true,
zones: [
{ name: "Week 27 - July 3-6", startDate: new Date(2012, 6, 3, 3), endDate: new Date(2012, 6, 6, 9) },
{ name: "Week 28 - July 10-14", startDate: new Date(2012, 6, 10, 20), endDate: new Date(2012, 6, 14, 14) }
],
showIndicators: true,
indicators: [
{ name: "July 4 - noon", description: "Independence day", startDate: new Date(2012, 6, 4, 12) }
]
});
startDateField :
wich has a different name in the dataSource I receive an error: "ISC_Calendar.js:213 Uncaught TypeError: Cannot read property 'getTime' of undefined"
If I don:t set the property I don't receive the error.
Kind regards
Paul
1,) SmartClient:v11.0p_2016-07-19
2.)Browser:chrome Version 52.0.2743.116 m
5.)Stack Trace:Stack from error.stack:
CalendarView.drawZones(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:213:173
CalendarView.refreshVisibleEvents(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:194:22
CalendarView.refreshEvents(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:228:53
[c]Class.invokeSuper(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Core.js:294:93
[c]Class.Super(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Core.js:286:170
TimelineView.refreshEvents(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:367:312
Calendar.refreshSelectedView(<no args: exited>) on [Timeline ID:timeline] @ ISC_Calendar.js:471:1408
Calendar.dataChanged(<no args: exited>) on [Timeline ID:timeline] @ ISC_Calendar.js:471:161
CalendarView._refreshData(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:229:246
TimelineView._rebuild(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:367:163
TimelineView.setTimelineRange(<no args: exited>) on [TimelineView ID:timeline_timelineView] @ ISC_Calendar.js:375:225
Calendar.setChosenDate(<no args: exited>) on [Timeline ID:timeline] @ ISC_Calendar.js:536:46
Calendar.draw(<no args: exited>) on [Timeline ID:timeline] @ ISC_Calendar.js:548:41
Canvas.init(<no args: exited>) on [Timeline ID:timeline] @ ISC_Core.js:2160:91
Class.completeCreation(<no args: exited>) on [Timeline ID:timeline] @ ISC_Core.js:344:6
[c]Class.create(<no args: exited>) on [Class Timeline] @ ISC_Core.js:232:1837
<anonymous>(<no args: exited>) @ tlz.p:61:14
7.) Test Case
var developers = [
{ name: "charlesMadigen", title: "Charles Madigen", devGroup: "Managers" },
{ name: "tamaraKane", title: "Tamara Kane", devGroup: "Developers" },
{ name: "darcyFeeney", title: "Darcy Feeney", devGroup: "Managers" },
{ name: "kaiKong", title: "Kai Kong", devGroup: "Developers" },
{ name: "shellyFewel", title: "Shelly Fewel", devGroup: "Managers" },
{ name: "garretMonroe", title: "Garret Monroe", devGroup: "Developers" }
];
isc.RestDataSource.create({
ID: "tasks",
tableName: "tasks",
dataURL:"termink_pl.p",
dataProtocol: "postParams",
fields:{
eventId:{type:"datetime",title:"start"},
epkDatumAb:{type:"datetime", title:"Start"},
endDate:{type:"datetime",title:"end"},
lane:{type:"text",title:"Grp. Bezeichnung"},
canEdit:{type:"text",title:"Sortierwert"}
}
})
var _calStart = isc.DateUtil.getStartOf(new Date(2012, 6, 5), "W");
var _calEnd = _calStart.duplicate();
_calEnd.setDate(_calEnd.getDate() + 20);
isc.Timeline.create({
ID: "timeline",
height: 451,
startDate: _calStart,
endDate: _calEnd,
//dataSource: "tasks",
lanes: developers,
startDateField : "epkDatumAb",
headerLevels: [ { unit: "week" }, { unit: "day" } ],
laneFields: [ { name: "title", title: "Developer", minWidth: 120, autoFitWidth: true } ],
canEditLane: true,
showEventDescriptions: false,
columnsPerPage: 5,
disableWeekends: false,
laneEventPadding: 2,
eventSnapGap: 360, // 6-hour snapGap
showZones: true,
zones: [
{ name: "Week 27 - July 3-6", startDate: new Date(2012, 6, 3, 3), endDate: new Date(2012, 6, 6, 9) },
{ name: "Week 28 - July 10-14", startDate: new Date(2012, 6, 10, 20), endDate: new Date(2012, 6, 14, 14) }
],
showIndicators: true,
indicators: [
{ name: "July 4 - noon", description: "Independence day", startDate: new Date(2012, 6, 4, 12) }
]
});
Comment