diff --git a/index.html b/index.html index 39b6371..4fc051f 100644 --- a/index.html +++ b/index.html @@ -17,6 +17,7 @@ + @@ -347,7 +348,7 @@

Why?

For easy integration with scope objects.

Click to add an Event!

- + - -
+

How?

@@ -367,11 +367,17 @@

How?

<div ui-calendar="{height: 450,editable: true}" class="span8 calendar" ng-model="events"></div> function CalendarCtrl($scope) { - var date = new Date(); + var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); - + + $scope.eventSource = { + url: "http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic", + className: 'gcal-event', // an option! + currentTimezone: 'America/Chicago' // an option! + }; + $scope.events = [ {title: 'All Day Event',start: new Date(y, m, 1)}, {title: 'Long Event',start: new Date(y, m, d - 5),end: new Date(y, m, d - 2)}, @@ -379,9 +385,11 @@

How?

{id: 999,title: 'Repeating Event',start: new Date(y, m, d + 4, 16, 0),allDay: false}, {title: 'Birthday Party',start: new Date(y, m, d + 1, 19, 0),end: new Date(y, m, d + 1, 22, 30),allDay: false}, {title: 'Click for Google',start: new Date(y, m, 28),end: new Date(y, m, 29),url: 'http://google.com/'} - ] + ]; + + $scope.eventSources = [$scope.events, $scope.eventSource]; - $scope.addChild = function() { + $scope.addEvent = function() { $scope.events.push({ title: 'Open Sesame', start: new Date(y, m, 28), diff --git a/js/app.js b/js/app.js index 1e31a72..f0cb15c 100644 --- a/js/app.js +++ b/js/app.js @@ -192,7 +192,13 @@ function CalendarCtrl($scope) { var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); - + + $scope.eventSource = { + url: "http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic", + className: 'gcal-event', // an option! + currentTimezone: 'America/Chicago' // an option! + }; + $scope.events = [ {title: 'All Day Event',start: new Date(y, m, 1)}, {title: 'Long Event',start: new Date(y, m, d - 5),end: new Date(y, m, d - 2)}, @@ -200,9 +206,11 @@ function CalendarCtrl($scope) { {id: 999,title: 'Repeating Event',start: new Date(y, m, d + 4, 16, 0),allDay: false}, {title: 'Birthday Party',start: new Date(y, m, d + 1, 19, 0),end: new Date(y, m, d + 1, 22, 30),allDay: false}, {title: 'Click for Google',start: new Date(y, m, 28),end: new Date(y, m, 29),url: 'http://google.com/'} - ] + ]; + + $scope.eventSources = [$scope.events, $scope.eventSource]; - $scope.addChild = function() { + $scope.addEvent = function() { $scope.events.push({ title: 'Open Sesame', start: new Date(y, m, 28),