how to restrict bootstrap date picker from future date

后端 未结 10 1634
无人共我
无人共我 2020-12-09 08:41

I want to restrict the date picker of bootstrap from taking future date.I just want to enable the dates up to today only.How can i achieve this.

Here is my code

10条回答
  •  时光说笑
    2020-12-09 09:36

    Here is a demo of a working solution:

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

    
    

    edit: the version of Bootstrap Datepicker that supports startDate and endDate is here: https://github.com/eternicode/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/

提交回复
热议问题