Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how make calender in bootstrap

/* include this in header tag (<head> .. </head>)  */
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.standalone.min.css" integrity="sha512-TQQ3J4WkE/rwojNFo6OJdyu6G8Xe9z8rMrlF9y7xpFbQfW5g8aSWcygCQ4vqRiJqFsDsE1T6MoAOMJkFXlrI9A==" crossorigin="anonymous" referrerpolicy="no-referrer" />


/*include this in footer before closing body tag (</body>), after jquery cdn if used */
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script>


/* add this in html */
<label for="date" class="form-label">
		Due Date <span style="color:red;">*</span>
</label>
<div class="input-group date" id="datepicker">
    <input type="text" class="form-control datepicker" data-date-format="mm/dd/yyyy">
    <span class="input-group-addon">
    <span class="input-group-text bg-white d-block">
    <i class="fa fa-calendar"></i>
    </span>
    </span>
</div>


/* add this script after bootstrap-datepicker.min.js cdn  */
<script type="text/javascript">
            $(document).ready(function () {
                $('.datepicker').datepicker();
            });
        </script>
Comment

PREVIOUS NEXT
Code Example
Javascript :: express and node 
Javascript :: create bottom navigation bar react native 
Javascript :: how to check if local storage is available 
Javascript :: Generate a Random Integer 
Javascript :: swr npm 
Javascript :: use $axios in vuex in nuxt 
Javascript :: javascript email validation 
Javascript :: math.floor 
Javascript :: concat multiple arrays in javascript 
Javascript :: WebPack basic Configuration 
Javascript :: ejs render 
Javascript :: nginx reverse proxy redirect 
Javascript :: import npm dotenv package 
Javascript :: check if array contain the all element javascript 
Javascript :: node js split 
Javascript :: js round 2 decimals 
Javascript :: javascript string new line 
Javascript :: Promises ex. 
Javascript :: encodeuricomponent reverse 
Javascript :: Custom JavaScript URL Builder 
Javascript :: extract text from a string javascript 
Javascript :: split in javascript 
Javascript :: js join two arrays 
Javascript :: js json escape 
Javascript :: express controller 
Javascript :: clone a JavaScript object 
Javascript :: vs code file nesting 
Javascript :: greater than x but less than y javascript 
Javascript :: js if not undefined or null 
Javascript :: find object in array 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =