Elgg  Version 1.11
Variables
date.php File Reference

Go to the source code of this file.

Variables

 $vars ['class'] = (array) elgg_extract('class', $vars, [])
 Elgg date input Displays a text field with a popup date picker. More...
 
 $vars ['class'][] = 'elgg-input-date'
 
 $vars ['class'][] = 'popup_calendar'
 
 $defaults
 
 $timestamp = $vars['timestamp']
 
if($timestamp) if (is_numeric( $vars[ 'value']))
 

Variable Documentation

◆ $defaults

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

Definition at line 26 of file date.php.

◆ $timestamp

$timestamp = $vars['timestamp']

Definition at line 35 of file date.php.

◆ $vars [1/3]

$vars = (array) elgg_extract('class', $vars, [])

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.

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

Definition at line 20 of file date.php.

◆ $vars [2/3]

$vars[ 'class'][] = 'elgg-input-date'

Definition at line 21 of file date.php.

◆ $vars [3/3]

$vars[ 'class'][] = 'popup_calendar'

Definition at line 24 of file date.php.

◆ if

if ( $timestamp) if(is_numeric($vars['value'])) ( is_numeric( $vars[ 'value'])  )

Definition at line 47 of file date.php.