且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何限制未来日期的引导日期选择器

更新时间:2023-01-29 18:07:22

这是一个工作解决方案的演示:

Here is a demo of a working solution:

http://jsfiddle.net/tjnicolaides/cjp7y/

<script>
$(function(){
    $('.datepicker').datepicker({
        format: 'mm-dd-yyyy',
        endDate: '+0d',
        autoclose: true
    });
});
</script>

编辑:支持startDate和endDate的Bootstrap Datepicker版本在这里: https://github.com/eternicode/bootstrap-datepicker

edit: the version of Bootstrap Datepicker that supports startDate and endDate is here: https://github.com/eternicode/bootstrap-datepicker

原始项目,这是当前顶尖的插件搜索结果,目前还没有此功能: http://www.eyecon.ro / bootstrap-datepicker /

The original project, which is the current top search result for the plugin, does not have that feature at this time: http://www.eyecon.ro/bootstrap-datepicker/