[英]how to use Datepicker in Angular UI Modal
i have string datepicker its working fine when i use in page but its not working when i use this datepicker in Angular UI modal '$uibModal'
... how to use this i spend 4 hours in this issue but not its not working https://cdnjs.com/libraries/bootstrap-datetimepicker 我有字符串datepicker,当我在页面中使用时可以正常工作,但是当我在Angular UI模式
'$uibModal'
中使用此'$uibModal'
时,它无法正常工作...如何使用它,我在此问题上花费了4个小时,但无法正常工作https: //cdnjs.com/libraries/bootstrap-datetimepicker
<div class="col-md-4">
<div class="input-group date form_date " data-date="" data-date-format="dd-mm-yyyy" data-link-field="dtp_input2" data-link-format="yyyy-mm-dd">
<input ng-model="FromDate" autocomplete="off" id="FromDate" class="form-control input-height" placeholder="Date" type="text">
<span class="input-group-addon"><span class="fa fa-calendar"></span></span>
</div>
</div>
var modalInstance = $uibModal.open({
animation: this.animationsEnabled,
templateUrl: '../../../Templates/AddModel.html',
controller: 'RCtrl',
scope: $scope,
size: 'lg'
});
$scope.modalInstance = this.modalInstance;
return modalInstance.result;
Here is your modified code: 这是修改后的代码:
var modalInstance = $uibModal.open({
animation: this.animationsEnabled,
templateUrl: '../../../Templates/AddModel.html',
controller: 'RCtrl',
scope: $scope,
size: 'lg'
});
modalInstance.opened.then(function(){
$timeout(function(){
$('#FromDate').datetimepicker();
}, 500)
});
$scope.modalInstance = modalInstance;
return modalInstance.result;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.