aboutsummaryrefslogtreecommitdiff
path: root/mod/html5/views/default/input/datetime.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/html5/views/default/input/datetime.php')
-rw-r--r--mod/html5/views/default/input/datetime.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/mod/html5/views/default/input/datetime.php b/mod/html5/views/default/input/datetime.php
new file mode 100644
index 000000000..69e4bd7f7
--- /dev/null
+++ b/mod/html5/views/default/input/datetime.php
@@ -0,0 +1,15 @@
+<?php
+$defaults = array(
+ 'class' => 'elgg-input-datetime',
+);
+
+$vars = array_merge($defaults, $vars);
+
+if (isset($vars['value']) && is_int($vars['value'])) {
+ $vars['value'] = date("c", $vars['value']);
+}
+
+$vars['type'] = 'datetime';
+
+?>
+<input <?php echo elgg_format_attributes($vars); ?> />