如何使用angularjs和jquery禁用datepicker中的未来日期 [英] How to disable the future dates in datepicker using angularjs and jquery
本文介绍了如何使用angularjs和jquery禁用datepicker中的未来日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要禁用将来的日期,我已经尝试了所有方法 但是我无法通知我错了.
Hi I need to disable the future dates, I have tried in all the ways but I'm unable please let me know where I'm wrong.
<div class="input-group date">
<input type="text" class="form-control pull-right" id="datepicker2" placeholder="Date of Join" ng-model="DateofJoining">
<div class="input-group-addon"></div>
</div>
$('#datepicker2').datepicker({
autoclose: true,
maxDate: new Date()
});
我什至也尝试过angularjs,但无法禁用它们,请让我知道如何禁用将来的日期.
I have even tried in angularjs also but wasn't able to disable them, please let me know how to disable the future dates.
我正在使用 bootstrap-datepicker.js 创建日期选择器.
I'm using bootstrap-datepicker.js for creating the datepicker.
推荐答案
使用AngularJS UI Bootstrap日期选择器:
Use the AngularJS UI Bootstrap date picker:
这篇关于如何使用angularjs和jquery禁用datepicker中的未来日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文