This repository has been archived by the owner on Jun 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(allDayEvents): allow events to be displayed as all day on the da…
…y view Closes #312
- Loading branch information
Matt Lewis
committed
May 13, 2016
1 parent
c0a02d9
commit 9be6426
Showing
8 changed files
with
86 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
angular | ||
.module('mwl.calendar.docs') | ||
.controller('AllDayEventsCtrl', function(moment) { | ||
|
||
var vm = this; | ||
|
||
vm.events = [ | ||
{ | ||
title: 'An all day event', | ||
type: 'warning', | ||
startsAt: moment().startOf('week').subtract(2, 'days').add(8, 'hours').toDate(), | ||
endsAt: moment().startOf('week').add(1, 'week').add(9, 'hours').toDate(), | ||
allDay: true | ||
}, { | ||
title: 'A non all day egent', | ||
type: 'important', | ||
startsAt: moment().startOf('day').add(7, 'hours').toDate(), | ||
endsAt: moment().startOf('day').add(19, 'hours').toDate(), | ||
draggable: true, | ||
resizable: true | ||
} | ||
]; | ||
|
||
vm.calendarView = 'day'; | ||
vm.viewDate = moment().toDate(); | ||
vm.isCellOpen = true; | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div ng-controller="AllDayEventsCtrl as vm"> | ||
<mwl-calendar | ||
events="vm.events" | ||
view="vm.calendarView" | ||
view-date="vm.viewDate" | ||
cell-is-open="vm.isCellOpen"> | ||
</mwl-calendar> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters