LP#1796903: (follow-up) disabled the calendar button when the text input is disabled
[working/Evergreen.git] / Open-ILS / src / templates / staff / share / t_datetime.tt2
1 <div>
2   <div>
3     <!-- Date Picker -->
4     <div class="input-group">
5       <input type="text"
6         id="{{id}}"
7         class="form-control"
8         ng-show="!hideDatePicker"
9         uib-datepicker-popup="{{date_format}}"
10         is-open="datePickerIsOpen"
11         datepicker-options="options"
12         ng-model="ngModel"
13         ng-change="ngChange"
14         ng-blur="ngBlur"
15         ng-disabled="ngDisabled"
16         ng-required="ngRequired"
17         focus-me="focusMe"
18         close-text="{{closeText}}"/>
19       <span class="input-group-btn">
20         <button type="button" class="btn btn-default"
21           ng-click="datePickerIsOpen=!datePickerIsOpen" ng-disabled="ngDisabled"
22           aria-label="Select a date" aria-pressed="{{datePickerIsOpen || false}}">
23           <span class="glyphicon glyphicon-calendar" title="Select a date"></span>
24         </button>
25       </span>
26     </div>
27   </div>
28   <!-- Time Picker
29       let time picker break to a new line since it does not
30       not line up horizontally very well with the date picker -->
31   <div>
32     <span>
33       <div uib-timepicker
34         ng-class="{hidden:!showTimePicker}"
35         ng-hide="hideTimePicker"
36         ng-model="ngModel"
37         ng-disabled="ngDisabled"
38         ng-required="ngRequired"
39         ng-blur="ngBlur"
40         ng-change="ngChange">
41       </div>
42     </span>
43   </div>
44
45   <div>
46     <span ng-show="outOfRange" class="label label-danger">[% l('Input is out of range.') %]</span>
47   </div>
48 </div>
49