Speed up development with full-stack environments for every branch.

Learn More

future and past date desabled [bootstrap and bootstrap datepicker]

Forked from Bootstrap datepicker example - text input with specifying date format2.

5133 Runs 19024 Views 20858 Copies


pratibha 1

published 3 years ago

<!DOCTYPE html>
        <title>bootstrap datepicker examples</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <!-- Bootstrap CSS and bootstrap datepicker CSS used for styling the demo pages-->
        <link rel="stylesheet" href="css/datepicker.css">
        <link rel="stylesheet" href="css/bootstrap.css">
        <div class="container">
            <div class="hero-unit">
                <input  type="text" placeholder="click to show datepicker"  id="example1">
                <input  type="text" placeholder="click to show datepicker"  id="example2">
        <!-- Load jQuery and bootstrap datepicker scripts -->
        <script src="js/jquery-1.9.1.min.js"></script>
        <script src="js/bootstrap-datepicker.js"></script>
        <script type="text/javascript">
            // When the document is ready
            $(document).ready(function () {
                var date = new Date();
                    startDate: date

               /* $('#example1').datepicker({
                    format: "dd/mm/yyyy"
                });  */
  var FromEndDate = new Date();

      format: 'mm-dd-yyyy',
     endDate: FromEndDate, 
    autoclose: true
Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).