Anyone here how do I display today's date in jquery datepicker? Tried these but it doesn't display today's date in datepicker.
$('#from').datepicker({
defaultDate: new Date(),
dateFormat: 'yy-mm-dd',
onSelect: function () {
table.draw();
},
changeMonth: true,
changeYear: true
});
$('#to').datepicker({
defaultDate: new Date(),
dateFormat: 'yy-mm-dd',
onSelect: function () {
table.draw();
},
changeMonth: true,
changeYear: true
});
setDate
defaultDate:
- Set the date to highlight on first opening if the field is blank .. or null for today. api.jqueryui.com/datepicker/#option-defaultDate