aboutsummaryrefslogtreecommitdiff
path: root/mod/html5/views/default/input/datetime-local.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/html5/views/default/input/datetime-local.php')
-rw-r--r--mod/html5/views/default/input/datetime-local.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/mod/html5/views/default/input/datetime-local.php b/mod/html5/views/default/input/datetime-local.php
new file mode 100644
index 000000000..468843901
--- /dev/null
+++ b/mod/html5/views/default/input/datetime-local.php
@@ -0,0 +1,14 @@
+<?php
+$defaults = array(
+ 'class' => 'elgg-input-datetime-local',
+);
+
+$vars = array_merge($defaults, $vars);
+
+if (isset($vars['value']) && is_int($vars['value'])) {
+ $vars['value'] = date("Y-m-d\TH:i:s", $vars['value']);
+}
+
+$vars['type'] = 'datetime-local';
+?>
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file