From fa763e03865b0426332c61f2f3cfa05c43347659 Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 29 Apr 2008 09:41:45 +0000 Subject: small tweak to the calendar input git-svn-id: https://code.elgg.org/elgg/trunk@549 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/input/calendar.php | 50 +++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'views/default/input/calendar.php') diff --git a/views/default/input/calendar.php b/views/default/input/calendar.php index 300850cb3..fd8336a51 100644 --- a/views/default/input/calendar.php +++ b/views/default/input/calendar.php @@ -1,4 +1,4 @@ - - -END; - $calendarjs = 1; - } - $strippedname = sanitise_string($vars['internalname']); - $js = "cal" . $strippedname; - - if ($vars['value'] > 86400) { - $val = date("F j, Y",$vars['value']); - } - -?> - - name="" id="" value="" /> + + static $calendarjs; + if (empty($calendarjs)) { + + echo <<< END + + + +END; + $calendarjs = 1; + } + $strippedname = sanitise_string($vars['internalname']); + $js = "cal" . $strippedname; + + if ($vars['value'] > 86400) { + $val = date("F j, Y",$vars['value']); + } else { + $val = $vars['value']; + } + +?> + + name="" id="" value="" /> select \ No newline at end of file -- cgit v1.2.3