From: Iain Patterson Date: Tue, 15 Oct 2013 09:17:12 +0000 (-0400) Subject: Use datepicker() in show_date_form(). X-Git-Tag: 2013-10-15~1 X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=3b2e8214805eb2bdebb7485ce29c072815361eef;p=readifood.git Use datepicker() in show_date_form(). All date selectors are now standardised. --- 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) {