Date Picker UK Format
Permalink 1 user found helpfulBeen searching but I can't seem to locate the files that make up the Date Picker, on both ProNews & Extended Form when you use the date picker it shows up as the US format ie, m/d/y, could really do with it showing as d/m/y. Is the date picker part of the core or does each block have its own date picker and also how do I change this?
thanks in advance
http://www.concrete5.org/community/forums/customizing_c5/non-us-dat...
Basically, you'll want to include another constant, and make sure you use d-m-Y instead of d/m/Y
Solution is to (ignore my previous post and...) manually code the input as so...
and then manually set the format using jQuery...
<script> $('.datepicker').datepicker({dateFormat: 'dd-mm-yy'}) </script>
In concrete 5.7.5.2 the datepicker() format used in custom forms appears to (sadly) be hard-coded in /concrete/src/Form/Service/Widget/DateTime.php.
The only way I found to change it was to inject the following Javascript into the bottom of my theme template:
$('.ccm-input-date.hasDatepicker').datepicker('option', 'dateFormat' ,'d M yy');
define('DATE_APP_GENERIC_MDYT_FULL', 'F d, Y \a\t g:i A');
define('DATE_APP_GENERIC_MDYT', 'j/n/Y \a\t g:i A');
define('DATE_APP_GENERIC_MDY', 'j/n/Y');