1. 程式人生 > >時間插件

時間插件

ref open cti date lac closed func 輸入 vendor

‘/Scripts/Vendor/jquery-ui/jquery-ui.min.js‘,

<link href="/Content/common/jquery-ui.min.css" rel="stylesheet" />

HTML部分:
<div class="form-group">
<label class="nowDate col-md-2 control-label" >項目開始日期:</label>
<div class="col-md-4">
<input type="text" class="datepicker form-control col-md-3" placeholder="請輸入項目開始時間">
</div>
</div>


js部分:
$scope.openModal = function (id) {
var modalInstance = $uibModal.open({
templateUrl: id,
controller: function ($scope, $uibModalInstance) {
//懶加載,時間插件
$timeout(function () {
angular.element(‘.datepicker‘).datepicker();
}, 100);
$scope.ok = function () {
$uibModalInstance.close(‘closed‘);
}
$scope.cancel = function () {
$uibModalInstance.dismiss(‘cancel‘);
}
},
size: ‘lg‘,

});

}

時間插件