Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

feat(dayView): allow all hour segment times to be shown

Closes #429
  • Loading branch information...
Matt Lewis
Matt Lewis committed Aug 27, 2016
1 parent da4718e commit 06bc8364f0ae47e77a5402bcb570da43ee07f45a
@@ -0,0 +1,16 @@
angular
.module('mwl.calendar.docs')
.controller('DayViewAllTimesCtrl', function($scope, moment, calendarConfig) {

var vm = this;
vm.events = [];
vm.calendarView = 'day';
vm.viewDate = moment().startOf('month').toDate();
var originalFormat = calendarConfig.dateFormats.hour;
calendarConfig.dateFormats.hour = 'HH:mm';

$scope.$on('$destroy', function() {
calendarConfig.dateFormats.hour = originalFormat; // reset for other demos
});

});
@@ -0,0 +1,12 @@
<div ng-controller="DayViewAllTimesCtrl as vm">
<style type="text/css">
.cal-day-hour-part-time strong.ng-hide {
display: block !important;
}
</style>
<mwl-calendar
events="vm.events"
view="vm.calendarView"
view-date="vm.viewDate">
</mwl-calendar>
</div>
@@ -67,4 +67,7 @@
}, {
"key": "all-day-events",
"label": "All day events"
}, {
"key": "day-view-all-times",
"label": "Show all times on day view"
}]
@@ -17,7 +17,7 @@
on-drag-select-end="vm.onDragSelectEnd(vm.getClickedDate(segment.date, vm.dayViewSplit * ($index + 1)))"
ng-if="!vm.dayWidth">
<div class="cal-day-hour-part-time">
<strong ng-bind="segment.date | calendarDate:'hour':true" ng-if="segment.isStart"></strong>
<strong ng-bind="segment.date | calendarDate:'hour':true" ng-show="segment.isStart"></strong>
</div>
</div>

@@ -26,7 +26,7 @@
ng-repeat="segment in hour.segments track by $index"
ng-if="vm.dayWidth">
<div class="cal-day-hour-part-time">
<strong ng-bind="segment.date | calendarDate:'hour':true" ng-if="segment.isStart"></strong>
<strong ng-bind="segment.date | calendarDate:'hour':true" ng-show="segment.isStart"></strong>
&nbsp;
</div>
<div

0 comments on commit 06bc836

Please sign in to comment.
You can’t perform that action at this time.