aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/datetime.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/input/datetime.php')
-rw-r--r--views/default/input/datetime.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/views/default/input/datetime.php b/views/default/input/datetime.php
index 8cc9d9087..d7d0a4291 100644
--- a/views/default/input/datetime.php
+++ b/views/default/input/datetime.php
@@ -1,9 +1,14 @@
<?php
+$defaults = array(
+ 'placeholder' => 'yyyy-mm-ddThh:mm:ss',
+);
$overrides = array(
'type' => 'datetime',
);
-$args = array_merge($vars, $overrides);
+if (isset($vars['value']) && is_int($vars['value'])) {
+ $vars['value'] = date("Y-m-d\TH:i:s", $vars['value']);
+}
-echo elgg_view('input/default', $args); \ No newline at end of file
+echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file