javascript close calendar after select
$(document).ready(function () {
$('#example1').datepicker({
format: "dd/mm/yyyy",
autoclose: true
});
//Alternativ way
$('#example2').datepicker({
format: "dd/mm/yyyy"
}).on('change', function(){
$('.datepicker').hide();
});
});
<div class="container">
<div class="hero-unit">
<input type="text" placeholder="Sample 1: Click to show datepicker" id="example1">
</div>
<div class="hero-unit">
<input type="text" placeholder="Sample 2: Click to show datepicker" id="example2">
</div>
</div>
Also in JavaScript:
- jquery toggle show hide
- node if file exists
- get current date javascript full month
- check if time is greater than javascript
- convert timestamp to date js
- javascript change select options dynamically
- jspdf cdn
- jquery array compare values
- jquery remove keypress event
- gatsbyjs image sharp
- how to add toaster in angular 9
- how to reference the bot joining a server in discord.js
- make select option selected javascript
- play iframe video onclick a link javascript
- how to create monorapo project in angular 8
- js get numbers from string
- apoolo uselaxyQuery bypass cache
- javascript atualize array
- react route
- jquery add text to textbox
- remove floating point javascript
- for in object javascript
- javascript leave page warning
- js throw custom error