[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ic] Date widget reverse years


I could not find a way to reverse sort the years in the date widget. This patch allows year_end to be less than year_begin and will sort the years in reverse order (latest to earliest).

--- /usr/local/interchange-5.4.0-orig/lib/Vend/Form.pm 2005-11-30 10:01:56.000000000 -0500 +++ /usr/lib/interchange/Vend/Form.pm 2006-09-19 11:34:08.000000000 -0400
@@ -506,7 +506,7 @@
                if($ey < 100) {
                        $ey += $cy;
                }
-               @Years = ($by .. $ey);
+ @Years = $by <= $ey ? ($by .. $ey) : reverse ($ey .. $by);
        }
        if ($opt->{blank}) {
$out .= qq{<option value="0000"$opt_extra>----</ option>};


Bill Carr
Bottlenose - Wine & Spirits eBusiness Specialists
(877) 857-6700
http://www.bottlenose-wine.com

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.