Agent-readable demo data

Title
Open-Source AngularJS Monthly Event Calendar | DayPilot Lite for JavaScript Demo
Tree
DayPilot JavaScript Demo
Catalog root
Lite
Description
Note: Read more about the AngularJS monthly event calendar.

Inline demo script 1

var app = angular.module('main', ['daypilot']).controller('DemoCtrl', function($scope) {

                            $scope.config = {
                                startDate: "2026-09-01"
                            };

                            $scope.events = [
                                {
                                    start: new DayPilot.Date("2026-09-01T10:00:00"),
                                    end: new DayPilot.Date("2026-09-01T14:00:00"),
                                    id: DayPilot.guid(),
                                    text: "First Event"
                                }
                            ];

                            $scope.add = function() {
                                $scope.events.push(
                                        {
                                            start: new DayPilot.Date("2026-09-01T10:00:00"),
                                            end: new DayPilot.Date("2026-09-01T12:00:00"),
                                            id: DayPilot.guid(),
                                            text: "Simple Event"
                                        }
                                );
                            };

                            $scope.move = function() {
                                var event = $scope.events[0];
                                event.start = event.start.addDays(1);
                                event.end = event.end.addDays(1);
                            };

                            $scope.rename = function() {
                                $scope.events[0].text = "New name";
                            };

                        });