aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/datetime-local.php
blob: c9f0b32f9cc8c882c79b237038ff15d9eb468658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
$defaults = array(
	'placeholder' => elgg_echo('placeholder:datetime-local'), //'yyyy-mm-ddThh:mm:ss',
);

$overrides = array(
	'type' => 'datetime-local',
);

if (isset($vars['value']) && is_int($vars['value'])) {
	$vars['value'] = date("Y-m-d\TH:i:s", $vars['value']);
}

echo elgg_view('html/input', array_merge($defaults, $vars, $overrides));