Angular-UI Datepicker min-date setting with another date
Angular-UI Datepicker min-date setting with another date
当用户使用 angular-ui Datepicker 输入日期范围时,我想注意 EndDate
设置“StartDate”。
在我看来,
<div class="input-daterange input-group" id="datepicker">
<input type="text" class="input form-control" name="ev_StartDate"
ng-model="evStartDate" ng-required="true" is-open="startPop.opened"
ng-focus="openStart()" uib-datepicker-popup="{{format}}"
alt-input-formats="altInputFormats" datepicker-options="startDateOptions"
readonly="true">
<span class="input-group-addon">~</span>
<input type="text" class="input form-control" name="ev_EndDate"
ng-model="evEndDate" ng-required="true" is-open="endPop.opened"
ng-focus="openEnd()" uib-datepicker-popup="{{format}}"
alt-input-formats="altInputFormats" datepicker-options="endDateOptions"
readonly="true">
</div>
哪个指令使用正确?
$scope.startDateOptions = {
showWeeks: false,
startingDay: 1
};
$scope.setOption = function() {
????????
};
$scope.endDateOptions = {
showWeeks: false,
startingDay: 1,
minDate: ?????
};
可以使用min-date
属性,直接传入startdate的作用域变量evStartDate
。将以下属性添加到结束日期输入元素。
min-date="evStartDate"
当用户使用 angular-ui Datepicker 输入日期范围时,我想注意 EndDate
设置“StartDate”。
在我看来,
<div class="input-daterange input-group" id="datepicker">
<input type="text" class="input form-control" name="ev_StartDate"
ng-model="evStartDate" ng-required="true" is-open="startPop.opened"
ng-focus="openStart()" uib-datepicker-popup="{{format}}"
alt-input-formats="altInputFormats" datepicker-options="startDateOptions"
readonly="true">
<span class="input-group-addon">~</span>
<input type="text" class="input form-control" name="ev_EndDate"
ng-model="evEndDate" ng-required="true" is-open="endPop.opened"
ng-focus="openEnd()" uib-datepicker-popup="{{format}}"
alt-input-formats="altInputFormats" datepicker-options="endDateOptions"
readonly="true">
</div>
哪个指令使用正确?
$scope.startDateOptions = {
showWeeks: false,
startingDay: 1
};
$scope.setOption = function() {
????????
};
$scope.endDateOptions = {
showWeeks: false,
startingDay: 1,
minDate: ?????
};
可以使用min-date
属性,直接传入startdate的作用域变量evStartDate
。将以下属性添加到结束日期输入元素。
min-date="evStartDate"