From 3b2e8214805eb2bdebb7485ce29c072815361eef Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Tue, 15 Oct 2013 05:17:12 -0400 Subject: [PATCH] Use datepicker() in show_date_form(). All date selectors are now standardised. --- lib/functions.php | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/lib/functions.php b/lib/functions.php index a132ca1..2fcbe0e 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -486,32 +486,8 @@ } function show_date_form($name, $date = null) { - $past = 60; - $future = 60; - echo "\n"; - return; - if (! isset($date)) $date = date('Y-m-d'); - list($y, $m, $d) = iso8601_to_ymd($date); - - echo "Year: "; - echo "Month: "; - echo "Day: "; + if (! isset($date)) $date = date('Y-m-d', time()); + datepicker($name, $date); } function validate_postcode($postcode, &$outward = null, &$inward = null) { -- 2.7.4