js:
//日期控件
$scope.dateOptions = {
startingDay: 1,
class: 'datepicker'
};
//日期控件
$scope.format = "yyyy-MM-dd";
$scope.openDatepicker = function($event, i) {
$event.preventDefault();
$event.stopPropagation();
if(i==1){
$scope.loanDate = true;
}
}
html:
<div class="form-group col-sm-6">
<label>日期:</label>
<div class="input-group m-d">
<input type="text" class="form-control" name="loanDate"
datepicker-popup="{{format}}" ng-model="finance.loanDate"
is-open="loanDate" datepicker-options="dateOptions"
close-text="Close" /> <span class="input-group-btn">
<button type="button" class="btn btn-default"
ng-click="openDatepicker($event,1)">
<i class="glyphicon glyphicon-calendar"></i>
</button>
</span>
</div>
</div>
联系客服