Skip to content
This repository has been archived by the owner on Aug 6, 2020. It is now read-only.

add past and future classes #35

Merged
merged 1 commit into from
Nov 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/multipleDatePicker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion multipleDatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ angular.module('multipleDatePicker', [])
'</div>' +
'<div class="picker-days-row">' +
'<div class="text-center picker-day picker-empty" ng-repeat="x in emptyFirstDays">&nbsp;</div>' +
'<div class="text-center picker-day {{day.css}}" title="{{day.title}}" ng-repeat="day in days" ng-click="toggleDay($event, day)" ng-mouseover="hoverDay($event, day)" ng-mouseleave="dayHover($event, day)" ng-class="{\'picker-selected\':day.selected, \'picker-off\':!day.selectable, \'today\':day.today}">{{day ? day.format(\'D\') : \'\'}}</div>' +
'<div class="text-center picker-day {{day.css}}" title="{{day.title}}" ng-repeat="day in days" ng-click="toggleDay($event, day)" ng-mouseover="hoverDay($event, day)" ng-mouseleave="dayHover($event, day)" ng-class="{\'picker-selected\':day.selected, \'picker-off\':!day.selectable, \'today\':day.today,\'past\':day.past,\'future\':day.future}">{{day ? day.format(\'D\') : \'\'}}</div>' +
'<div class="text-center picker-day picker-empty" ng-repeat="x in emptyLastDays">&nbsp;</div>' +
'</div>' +
'</div>',
Expand Down Expand Up @@ -283,6 +283,8 @@ angular.module('multipleDatePicker', [])
date.selectable = !scope.isDayOff(scope, date);
date.selected = scope.isSelected(scope, date);
date.today = date.isSame(now, 'day');
date.past = date.isBefore(now, 'day');
date.future = date.isAfter(now, 'day');
return date;
};

Expand Down