I am new to WordPress and contact form 7. Is there any possibility to get today's date in the contact form 7 datepicker by default? I have this short-code is [date* date-299 min-date:0 first-day:1]. It didn't work for me. Is there any necessity for Hooks/Actions?
Help required!!
Thanks in advance.
In case someone is still looking for the better answer, it is in documentation: https://contactform7.com/date-field/
My date field example:
[date date-479 date-format:mm/dd/yy min:today+2days]
Notice, that only works with min!!! min-date doesn't work. :)
You can set it up using Jquery
var date = new Date();
$("#dates").datepicker({
dateFormat: 'd-M-y'
}).datepicker('setDate', date);
Where #date is the ID of the Text box field
After a lot of searching, the below method is working for me:
[date* date-775 date-format:YYYY-MM-DD min:today+1days id:date class:date]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With