Hi there,
I have the following code which blocks out 3 days on my datepicker.
$('input[name="ddate"]').datepicker({
dateFormat : 'dd/mm/yy',
minDate : '+3d'
});
However, the current datepicker script by default has todays date in the input field. I would like to display tomorrows date in the input field byt default when a user lands on the page.
How would I do this?
Thanks!
toolman
November 8, 2016, 10:04am
3
Thanks, I’ve tried the following, but it doesn’t seem to work:
$('input[name="ddate"]').datepicker({
defaultDate: +70
});
My HTML is:
<input class="datepicker hasDatepicker" name="ddate" id="dp1478599263558" type="text">
what’s the error?
pro tip: “it doesn’t work” is not a useful error description.
2 Likes
toolman
November 8, 2016, 12:59pm
5
Sorry, I meant that the date is not changing to the increased number of days in my above code
It’s setting the date to today’s date
toolman
November 15, 2016, 11:55am
8
I’m running the following in console and getting the following output:
$('input#dp1479210737880').datepicker({
defaultDate: +7
});
Object[input#dp1479210737880.datepicker.hasDatepicker property value = “30/11/2016” attribute value = “null”]
Any ideas why it’s not changing the date to 7 days ahead?
Thanks for your help
system
Closed
February 14, 2017, 6:56pm
9
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.