Hi,
While I am in Day view and navigate to date in which I have data, and from that When I am clicking on WorkWeek view, It is working and loaded workweek view properly.
But while I am in Day view and don't have any data, and from that When I am clicking on WorkWeek view, onNavigating event is executed and going to render timescale's majorSlotTemplate and minorSlotTemplate, for that I am using template.
<script id="majorSlotTemplate" type="text/x-template">
<div>${majorSlotTemplate(data.date)}</div>
</script>
<script id="minorSlotTemplate" type="text/x-template">
<div style="text-align: right; margin-right: 15px">${minorSlotTemplate(data.date)}</div>
</script>
<script type="text/javascript">
window.majorSlotTemplate = function (date) {
var instance = new ej.base.Internationalization();
return instance.formatDate(date, { skeleton: 'hm' });
};
window.minorSlotTemplate = function (date) {
var instance = new ej.base.Internationalization();
return instance.formatDate(date, { skeleton: 'hm' });
};
</script>
Now, I am getting following error, when it tries to render last
minorSlotTemplate, please refer following snapshot.
Uncaught RangeError: Invalid time value
at Date.toISOString (<anonymous>)
at e.generateQuery (ej2.min.js:1)
at e.refreshDataManager (ej2.min.js:1)
at e.render (ej2.min.js:1)
at t.initializeView (ej2.min.js:1)
at e.<anonymous> (ej2.min.js:1)
at e.notify (ej2.min.js:1)
at t.e.trigger (ej2.min.js:1)
at e.<anonymous> (ej2.min.js:1)
at e.notify (ej2.min.js:1)
Thanks.
Hi,
I am unable to download provided sample, please refer to the following snap.