Elgg  Version 1.9
Variables
date.php File Reference

Go to the source code of this file.

Variables

if(isset($vars['class'])) else
 Elgg date input Displays a text field with a popup date picker. More...
 
 $defaults
 
 $vars = array_merge($defaults, $vars)
 
 $timestamp = $vars['timestamp']
 
if($timestamp) if(is_numeric($vars['value'])) $attributes = elgg_format_attributes($vars)
 

Variable Documentation

if ($timestamp) if (is_numeric($vars['value'])) $attributes = elgg_format_attributes($vars)

Definition at line 55 of file date.php.

$defaults
Initial value:
= array(
'value' => '',
'disabled' => false,
'timestamp' => false,
)

Definition at line 27 of file date.php.

$timestamp = $vars['timestamp']

Definition at line 35 of file date.php.

$vars = array_merge($defaults, $vars)

Definition at line 33 of file date.php.

if (isset($vars['class'])) else
Initial value:
{
$vars['class'] = "elgg-input-date popup_calendar"
$vars
Definition: date.php:33

Elgg date input Displays a text field with a popup date picker.

The elgg.ui JavaScript library initializes the jQueryUI datepicker based on the CSS class .elgg-input-date. It uses the ISO 8601 standard for date representation: yyyy-mm-dd.

Unix timestamps are supported by setting the 'timestamp' parameter to true. The date is still displayed to the user in a text format but is submitted as a unix timestamp in seconds.

$vars['value'] The current value, if any (as a unix timestamp) $vars['class'] Additional CSS class $vars['timestamp'] Store as a Unix timestamp in seconds. Default = false Note: you cannot use an id with the timestamp option.

Definition at line 23 of file date.php.