Hello,
I'm using a custom field using a date attribute. In the report bug's page, the default setting is set on M-d-Y, i'd like to change this to d-M-Y.
Any idea?
Any help would be much appreciated !
Customize a custom field using a date attribute
Moderators: Developer, Contributor
Hi there,
The custom date controls use the format defined in the g_short_date_format configuration option. To change it as you require it, add the following to your config_inc.php
Note that this will change all dates currently in the M-d-Y format to d-M-Y.
To change the format of custom date fields only you can create your own custom config. First, define the format in config_inc.php
In core\custom_field_api.php there are three instances (assuming your using 1.0.3) where 'short_date_format' is used (lines 1209, 1234 and 1270 in my copy). Change each of these to 'custom_date_format'. I think thats all you'd have to change.
Nick
The custom date controls use the format defined in the g_short_date_format configuration option. To change it as you require it, add the following to your config_inc.php
Code: Select all
$g_short_date_format = 'd-M-Y';
To change the format of custom date fields only you can create your own custom config. First, define the format in config_inc.php
Code: Select all
$g_custom_date_format = 'd-M-Y';
Nick