Hi Everyone,
I've a question about the use of a custom field of type "Date".
I want to have the possibility to store for year 2006 (or other year before 2012).
How can I change the range of years suggested by the system? Thanks in advance....
Sara
Date Custom field - change starting year
Moderators: Developer, Contributor
Date Custom field - change starting year
- Attachments
-
- datetimeCustomField.jpg (28.19 KiB) Viewed 5717 times
Re: Date Custom field - change starting year
Add the following code to file config_inc.php and adjust it to your needs
Code: Select all
/**
* Number of years in the past that custom date fields will display in
* drop down boxes.
* @global integer $g_backward_year_count
*/
$g_backward_year_count = 4;
/**
* Number of years in the future that custom date fields will display in
* drop down boxes.
* @global integer $g_forward_year_count
*/
$g_forward_year_count = 4;
Re: Date Custom field - change starting year
Thank you very much for your kind reply, It works perfectly.
Regards
Sara
Regards
Sara