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