I want to set the values โโof the datepicker field and altFieldwhen the page is loaded, and I was wondering if there is an option in datepicker for this automatically (i.e. without a call setDate).
I know that if I do something like this:
$("#date-div").datepicker({altField:"#date-input",altFormat:"yy-mm-dd", defaultDate:+7});
If it date-divis div, the default date is automatically added to the field date-inputwhen the page loads. But if I use a text field instead div, it does not set the values โโautomatically (I have to call setDateon a separate line).
I'm just curious, I already implemented this by calling setDate, but I would like to know if there is something to do this automatically, and if not why? (since it works when using a div to display a calendar).
source
share