Custom Date Field

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
dyawlak
Posts: 66
Joined: 07 Dec 2007, 16:42

Custom Date Field

Post by dyawlak »

Sorry if this has already been asked.

I have a couple of date fields, but the drop down for the year is only showing 2008+ how do I get it to show x years previous and y years ahead?

Thanks
dyawlak
Posts: 66
Joined: 07 Dec 2007, 16:42

Re: Custom Date Field

Post by dyawlak »

Not sure if I have resolved it correctly - but it works.

Edited date_api.php and changed line 82 where I added -1

076 function print_year_range_option_list( $p_year = 0, $p_start = 0, $p_end = 0) {
077 $t_current = date( "Y" ) ;
078 $t_forward_years = config_get( 'forward_year_count' ) ;
079
080 $t_start_year = $p_start ;
081 if ($t_start_year == 0) {
082 $t_start_year = $t_current -1 ;
083 }
Post Reply