Tagged: date picker
I am using Enfold 4.3. I have a number of lengthy forms on the website. I have used the “Date Picker” field a number of times. On the page (where it gives the answer tip) the date format is correct for the US, it shows MM/DD/YEAR. This is fine but when I get a response in my email I am receiving those answers in DD/MM/YEAR format. I do have the preferred format set in my General settings but my responses are still showing up wrong.
Any suggestions?
Hey kMistDesign,
Thank you for using Enfold.
These filters should help you adjust the datepicker format.
add_filter('avf_datepicker_dateformat', 'new_date_format');
function new_date_format() {
$date_format = "mm / dd / yy";
return $date_format;
}
add_filter('avf_datepicker_date_placeholder', 'new_date_placeholder');
function new_date_placeholder() {
$placeholder = "MM/DD/YY";
return $placeholder;
}
Just add it in the functions.php file.
Best regards,
Ismael
I tried this and I ended with just a white screen. Is this supposed to be in the functions.php or functions-enfold.php?
Correction, I got this working. Thanks for the information. The date is now displaying the way I want it.