I have some questions regarding jQuery UI date picker.
1 - Is there an option to have a default value? What I am trying to do is pre-filled my input text type with today's date.
2 - If I put the type = "Date" instead of type = "Text" and then use jquery time picker on it, I get this error when I select the date.
The specified value '02/18/2015' does not conform to the required format, 'yyyy-MM-dd.'
To create the datepicker and set the date. you can assign today's date by
new Date()
. You can set inputtype=text
ortype=date
.
$('.datepicker').datepicker({
dateFormat: 'dd-mm-yy'
}).datepicker("setDate", new Date());