$( function() { $( "#fecha" ).datepicker({ showOn: "both", buttonImage: "images/calendar.png", buttonImageOnly: true, buttonText: "Seleccionar fecha" }); $( "#fecha" ).datepicker( "option", "dateFormat", "yy-mm-dd" ) $("#fecha").datepicker( "setDate" , new Date() ); } );