how to restrict bootstrap date picker from future date

Total Post:52

Points:366
 294  View(s)
Ratings:
Rate this:

I want to restrict datepicker taking future date . This is my jquery code

<script type="text/javascript">


    $(document).ready(function () {
        $('.datepicker').datepicker({
            format: "mm/dd/yyyy",           
            autoclose: true,

        });

    });
</script>
  1. Post:45

    Points:323
    Re: how to restrict bootstrap date picker from future date

    Try this code

    <script type="text/javascript">
        $(document).ready(function () {
           $('.datepicker').datepicker({
                format: "mm/dd/yyyy",           
                endDate: '+0d',
                autoclose: true,
            });
        });
    </script>

      Modified On Dec-13-2017 11:01:49 PM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!