var DemoApp = angular.module('DemoApp', ['dx']);
DemoApp.controller('DemoController', function DemoController($scope) {
$scope.schedulerOptions = {
timeZone: "America/Los_Angeles",
dataSource: data,
views: ["day", "week", "month"],
currentView: "month",
startDayHour: 9,
currentDate: new Date(2021, 2, 25),
firstDayOfWeek: 1,
resources: [{
fieldExpr: "roomId",
dataSource: resourcesData,
label: "Room"
}],
height: 600
};
});
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>DevExtreme Demo</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script>
<link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/20.2.4/css/dx.common.css" />
<link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/20.2.4/css/dx.light.css" />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular.min.js"></script>
<script>window.angular || document.write(decodeURIComponent('%3Cscript src="js/angular.min.js"%3E%3C/script%3E'))</script>
<script src="https://cdn3.devexpress.com/jslib/20.2.4/js/dx.all.js"></script>
<script src="data.js"></script>
<script src="index.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body class="dx-viewport">
<div class="demo-container" ng-app="DemoApp" ng-controller="DemoController">
<div dx-scheduler="schedulerOptions"></div>
</div>
</body>
</html>
var data = [
{
text: "Watercolor Landscape",
roomId: [1],
startDate: new Date("2021-03-01T17:30:00.000Z"),
endDate: new Date("2021-03-01T19:00:00.000Z"),
recurrenceRule: "FREQ=WEEKLY;BYDAY=TU,FR;COUNT=10"
}, {
text: "Oil Painting for Beginners",
roomId: [2],
startDate: new Date("2021-03-01T17:30:00.000Z"),
endDate: new Date("2021-03-01T19:00:00.000Z"),
recurrenceRule: "FREQ=WEEKLY;BYDAY=MO,TH;COUNT=10"
}, {
text: "Testing",
roomId: [3],
startDate: new Date("2021-03-01T20:00:00.000Z"),
endDate: new Date("2021-03-01T21:00:00.000Z"),
recurrenceRule: "FREQ=WEEKLY;BYDAY=MO;WKST=TU;INTERVAL=2;COUNT=2"
}, {
text: "Meeting of Instructors",
roomId: [4],
startDate: new Date("2021-03-01T17:00:00.000Z"),
endDate: new Date("2021-03-01T17:15:00.000Z"),
recurrenceRule: "FREQ=DAILY;BYDAY=WE;UNTIL=20210401"
}, {
text: "Recruiting students",
roomId: [5],
startDate: new Date("2021-02-24T18:00:00.000Z"),
endDate: new Date("2021-02-24T19:00:00.000Z"),
recurrenceRule: "FREQ=YEARLY;BYWEEKNO=14",
recurrenceException: "20210411T180000Z"
}, {
text: "Final exams",
roomId: [3],
startDate: new Date("2021-02-24T20:00:00.000Z"),
endDate: new Date("2021-02-24T21:35:00.000Z"),
recurrenceRule: "FREQ=YEARLY;BYWEEKNO=24;BYDAY=TH,FR"
}, {
text: "Monthly Planning",
roomId: [4],
startDate: new Date("2021-03-24T22:30:00.000Z"),
endDate: new Date("2021-03-24T23:45:00.000Z"),
recurrenceRule: "FREQ=MONTHLY;BYMONTHDAY=28;COUNT=1"
}, {
text: "Open Day",
roomId: [5],
startDate: new Date("2021-03-01T17:30:00.000Z"),
endDate: new Date("2021-03-01T21:00:00.000Z"),
recurrenceRule: "FREQ=YEARLY;BYYEARDAY=87"
}
];
var resourcesData = [
{
text: "Room 101",
id: 1,
color: "#bbd806"
}, {
text: "Room 102",
id: 2,
color: "#f34c8a"
}, {
text: "Room 103",
id: 3,
color: "#ae7fcc"
}, {
text: "Meeting room",
id: 4,
color: "#ff8817"
}, {
text: "Conference hall",
id: 5,
color: "#03bb92"
}
];