Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add id attribute to date picker and time picker #89

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open
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/angular-material-datetimepicker.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/angular-material-datetimepicker.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/material-datetimepicker.min.css

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

11 changes: 6 additions & 5 deletions js/angular-material-datetimepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
+ ' <div class="dtp-picker-datetime" ng-cloak ng-if="picker.currentView !== picker.VIEWS.DATE">'
+ ' <div class="dtp-actual-meridien">'
+ ' <div class="left p20">'
+ ' <a href="#" mdc-dtp-noclick class="dtp-meridien-am" ng-class="{selected: picker.meridien == \'AM\'}" ng-click="picker.selectAM()">{{picker.params.amText}}</a>'
+ ' <a id="time-periods-am" href="#" mdc-dtp-noclick class="dtp-meridien-am" ng-class="{selected: picker.meridien == \'AM\'}" ng-click="picker.selectAM()">{{picker.params.amText}}</a>'
+ ' </div>'
+ ' <div ng-show="!picker.timeMode" class="dtp-actual-time p60">{{picker.currentNearest5Minute().format(picker.params.shortTime ? "hh:mm" : "HH:mm")}}</div>'
+ ' <div class="right p20">'
+ ' <a href="#" mdc-dtp-noclick class="dtp-meridien-pm" ng-class="{selected: picker.meridien == \'PM\'}" ng-click="picker.selectPM()">{{picker.params.pmText}}</a>'
+ ' <a id="time-periods-pm" href="#" mdc-dtp-noclick class="dtp-meridien-pm" ng-class="{selected: picker.meridien == \'PM\'}" ng-click="picker.selectPM()">{{picker.params.pmText}}</a>'
+ ' </div>'
+ ' <div class="clearfix"></div>'
+ ' </div>'
Expand All @@ -57,7 +57,7 @@
+ ' </div>'
+ ' </md-dialog-content>'
+ ' <md-dialog-actions class="dtp-buttons">'
+ ' <md-button class="dtp-btn-ok md-button" ng-click="picker.today()"> {{picker.params.todayText}}</md-button>'
+ ' <md-button class="dtp-btn-today md-button" ng-click="picker.today()"> {{picker.params.todayText}}</md-button>'
+ ' <md-button class="dtp-btn-cancel md-button" ng-click="picker.cancel()"> {{picker.params.cancelText}}</md-button>'
+ ' <md-button class="dtp-btn-ok md-button" ng-click="picker.ok()"> {{picker.params.okText}}</md-button>'
+ ' </md-dialog-actions>'
Expand Down Expand Up @@ -746,7 +746,7 @@
//build a
var scopeRef = 'month[\'days\'][' + i + '][' + j + ']';

tbodyHtml.push('<a href="#" mdc-dtp-noclick class="dtp-select-day" ng-class="{selected: cal.isSelectedDay(' + scopeRef + '), hilite: cal.isDateOfTheDay(' + scopeRef + ')}" ng-click="cal.selectDate(' + scopeRef + ')">');
tbodyHtml.push('<a id="date-' + weekDay.format('YYYY-MM-DD') + '" href="#" mdc-dtp-noclick class="dtp-select-day" ng-class="{selected: cal.isSelectedDay(' + scopeRef + '), hilite: cal.isDateOfTheDay(' + scopeRef + ')}" ng-click="cal.selectDate(' + scopeRef + ')">');
tbodyHtml.push(weekDay.format('D'));
tbodyHtml.push('</a>');
} else {
Expand Down Expand Up @@ -814,7 +814,7 @@

var template = '<div class="dtp-picker-clock"><span ng-if="!points || points.length < 1">&nbsp;</span>'
+ '<div ng-repeat="point in points" class="dtp-picker-time" ng-style="point.style">'
+ ' <a href="#" mdc-dtp-noclick ng-class="{selected: point.value===currentValue}" class="dtp-select-hour" ng-click="setTime(point.value)" ng-if="pointAvailable(point)">{{point.display}}</a>'
+ ' <a href="#" id="time-{{mode}}-{{point.display}}" mdc-dtp-noclick ng-class="{selected: point.value===currentValue}" class="dtp-select-hour" ng-click="setTime(point.value)" ng-if="pointAvailable(point)">{{point.display}}</a>'
+ ' <a href="#" mdc-dtp-noclick class="disabled dtp-select-hour" ng-if="!pointAvailable(point)">{{point.display}}</a>'
+ '</div>'
+ '<div class="dtp-hand dtp-hour-hand"></div>'
Expand Down Expand Up @@ -882,6 +882,7 @@
}

scope.points = points;
scope.mode = attrs.mode;
setCurrentValue();
clock.css('height', clockWidth + 'px');
//picker.initHands(true);
Expand Down