Page 1 of 1
Customize a custom field using a date attribute
Posted: 18 Apr 2006, 13:54
by rudy
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 !
Posted: 16 Jun 2006, 08:20
by undergrid
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
Posted: 19 Jun 2006, 16:31
by rudy
Thanks a lot,
I tried it and it works perfectly.