Change the date format on booking forms
By default, the booking form on all of our themes uses the “YYYY/MM/DD” notation. In this article, we will see how this can be modified.
You will need to start by navigating to the /js folder of the theme. In there you will find the scripts.js file (on a couple of themes this might be named ci_scripts.js of jquery.scripts.js) and edit it.
Locate this line
and modify it to
or
according to your preference.
Notice: this line appears twice a few lines apart, change them both.
Next, we need to reconfigure the validation.
Edit the template-booking.php file located in the main theme folder and locate these bits of code
and
if you used the dd/mm/yy format, you will change them to
and
respectively, if you used the mm/dd/yy format, you will change them to
and
respectively.
When the changes are made you can save the file and you’re done.