I am using the function datepicker()
of JQuery-UI
and I have programmed it so that when loading my page it shows me the current date in an input HTML
.
JavaScript code
$(document).ready(function(){
$("#fecha-ticket").datepicker({
changeMonth:true,
changeYear: true,
dateFormat: "dd-mm-yy"}).datepicker("setDate", new Date());
$("#fecha-ticket").datepicker("hide");
$('#iconoCal').click(function() {
$("#fecha-ticket").focus();
});
});
The date is shown in the input as it should be:
But when doing the above, leave the calendar open at the bottom of my page.
What I would like to know is how or in what way can I show the current date without leaving the datepicker
open?
Try using:
datepicker( "hide" )