alloyscheulertest.ejs
953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<div id="wrapper">
<div id="myScheduler"></div>
</div>
<script>
YUI().use('aui-scheduler',
function(Y)
{
// code goes here
var temp = <%-pl %>;
var events = [];
temp.forEach(val =>
{
events.push(
{
content: val[0],
startDate: new Date(val[1], val[2], val[3], val[4], val[5]),
endDate: new Date(val[6], val[7], val[8], val[9], val[10]),
disabled: true
}
);
});
var weekView = new Y.SchedulerWeekView();
myScheduler = new Y.Scheduler(
{
boundingBox: '#myScheduler',
date: new Date(Date.now().getYear, Date.now().getMonth, Date.now().getDay),
items: events,
render: true,
views: [weekView]
}
);
});
</script>