22 $vars[
'class'][] =
'popup_calendar';
34 unset(
$vars[
'timestamp']);
37 if (!isset(
$vars[
'id'])) {
41 'name' =>
$vars[
'name'],
42 'value' =>
$vars[
'value'],
45 $vars[
'class'][] =
'elgg-input-timestamp';
50 if (is_numeric(
$vars[
'value'])) {
51 $vars[
'value'] = gmdate(
'Y-m-d',
$vars[
'value']);
56 unset(
$vars[
'datepicker_options']);
60 if (isset(
$vars[
'id'])) {
63 $selector =
".elgg-input-date[name='{$vars['name']}']";
67 require([
'input/date'],
function (
datepicker) {
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_extract_class(array $array, $existing=[])
Extract class names from an array with key "class", optionally merging into a preexisting set.
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype='')
Return a parsed view.
elgg_format_element($tag_name, array $attributes=array(), $text='', array $options=array())
Format an HTML element.