Hello happy new year everyone. I have a question, how can I add a day to the value captured from datepicker, for example I select 12/01/2016, I need to add a day, so that it shows me 12/02/2016.
The code I have is the following.
var datemin = $("#date1").val()
Greetings and thanks
In the jQuery UI documentation for the datepicker, you can find the
getDate
and methodssetDate
to read and write the date respectively.A solution would be to read the date of a field with
getDate
, add 1 (one day) and rewrite it withsetDate
, and then assign that value to the second field. Something like this:And here you can see it working:
You can use a function that I have taken from this post
And run it like this