alloyscheulertest.ejs 953 Bytes

<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>