Is there a way to set the dateFormat of datetime helper?

Permalink
Hi,

Thank you in advance!

BreakfastStudio
 
JohntheFish replied on at Permalink Reply
JohntheFish
in config/site.php:

// Set time to 24 hour format
define('DATE_FORM_HELPER_FORMAT_HOUR', '24');
// Use php date strings for any or all of
define('DATE_APP_GENERIC_MDY', 'j/m/Y');
define('DATE_APP_GENERIC_MDY_FULL', 'd F Y');
define('DATE_APP_GENERIC_MDYT', 'j/m/Y \a\t H:i');
define('DATE_APP_GENERIC_MDYT_FULL', 'd F Y \a\t H:i');
define('DATE_APP_GENERIC_T', 'H:i');
define('DATE_APP_GENERIC_TS', 'H:i:s');
BreakfastStudio replied on at Permalink Reply
BreakfastStudio
Thank you! @JohntheFish but the problem lies when the datepicker is changed. Initially the date is yyyy/mm/dd then when it is changed it turns to it's correct format mm/dd/yyyy. How to fix the initial display?
JohntheFish replied on at Permalink Reply
JohntheFish
Looking at the code, the constant for this field is DATE_APP_DATE_PICKER which needs to be in a format that the jQuery.ui datepicker can understand.

http://docs.jquery.com/UI/Datepicker/formatDate...

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.