From d29340b0fda7a768f6941088808de7e9e41aa616 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Wed, 4 Aug 2010 17:57:18 +0000 Subject: Updating date-related inputs to accept timestamps as well as string input --- views/default/input/date.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'views/default/input/date.php') diff --git a/views/default/input/date.php b/views/default/input/date.php index b347f835d..7e35c7beb 100644 --- a/views/default/input/date.php +++ b/views/default/input/date.php @@ -7,4 +7,8 @@ $overrides = array( 'type' => 'date', ); +if (isset($vars['value']) && is_int($vars['value'])) { + $vars['value'] = date("Y-m-d", $vars['value']); +} + echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file -- cgit v1.2.3