diff options
author | Evan Winslow <evan.b.winslow@gmail.com> | 2010-08-04 17:57:18 +0000 |
---|---|---|
committer | Evan Winslow <evan.b.winslow@gmail.com> | 2010-08-04 17:57:18 +0000 |
commit | d29340b0fda7a768f6941088808de7e9e41aa616 (patch) | |
tree | e5c2f6bb72c995d2d8ca4d085d9f9359a85b0fca /views/default/input/date.php | |
parent | 73d0be2e63fdeed67193e1e89c859a09468a3c4d (diff) | |
download | elgg-d29340b0fda7a768f6941088808de7e9e41aa616.tar.gz elgg-d29340b0fda7a768f6941088808de7e9e41aa616.tar.bz2 |
Updating date-related inputs to accept timestamps as well as string input
Diffstat (limited to 'views/default/input/date.php')
-rw-r--r-- | views/default/input/date.php | 4 |
1 files changed, 4 insertions, 0 deletions
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 |