我对这个特定的datetimepicker有疑问 https://angular-ui.github.io/bootstrap/ 是否可以触发此datetimepicker中的“now”按钮,仅在我按此时更改小时数?
这是我的HTML
<div class="col-md-9 datapicker-in-left">
<p class="input-group editEvent-input-date">
<input type="text"
id="beginDate"
class="form-control field-height datePickerWidth"
ng-style ="fieldRequired"
ng-model="event.beginDate"
datetime-picker="{{picker.format}}"
button-bar="picker.buttonBar"
timepicker-options="picker.timepickerOptions"
is-open="popup1.opened"
ng-blur="checkDates()"
ng-selected ="required()"
ng-change="checkDateField()"
ng-model-options="{timezone: 'UTC'}"
datetimepicker-neutral-timezone="{{timezone}}"
check-profile="{{profileItems.visibleFieldsList['beginEvent']}}" />
<span class="input-group-btn">
<button type="button"
class="btn btn-default form-control date-but"
ng-click="openPopup(popup1)"
check-profile="{{profileItems.visibleFieldsList['beginEvent']}}"
check-readonly="{{isBlockedEvent || readOnly}}">
<i class="glyphicon glyphicon-calendar"></i>
</button>
</span>
</p>
<!-- <input class="date-widths" type="datetime-local" step="60" ng-model="startDate">-->
这是我设置datetimepicker
属性的唯一部分$scope.picker = {
format : "dd/MM/yyyy HH:mm:ss",
buttonBar : {
show: true,
now: {show: true, text: $translate.instant('DATA_PICKER_BUTTON_NOW')},
today: {show: true, text: $translate.instant('DATA_PICKER_BUTTON_TODAY')},
clear: {show: true, text: $translate.instant('DATA_PICKER_BUTTON_CLEAR')},
date: {show: true, text: $translate.instant('DATA_PICKER_BUTTON_DATE')},
time: {show: true, text: $translate.instant('DATA_PICKER_BUTTON_TIME')},
close: {show: true, text: $translate.instant('DATA_PICKER_BUTTON_CLOSE')}
},
timepickerOptions : {showSeconds: true, readonlyInput:true, showMeridian: false}
}
感谢您的帮助,抱歉我的英语很差