Elgg  Version 2.3
Variables
date.php File Reference

Go to the source code of this file.

Variables

 $vars ['class'] = elgg_extract_class($vars, 'elgg-input-date')
 Elgg date input Displays a text field with a popup date picker. More...
 
 $vars ['class'][] = 'popup_calendar'
 
 $defaults
 
 $timestamp = $vars['timestamp']
 
if($timestamp) if(is_numeric($vars['value'])) $datepicker_options = elgg_extract('datepicker_options', $vars)
 
 $vars ['data-datepicker-opts'] = $datepicker_options ? json_encode($datepicker_options) : ''
 
if(isset($vars['id'])) else
 

Variable Documentation

◆ $datepicker_options

if ( $timestamp) if (is_numeric( $vars[ 'value'])) $datepicker_options = elgg_extract('datepicker_options', $vars)

Definition at line 54 of file date.php.

◆ $defaults

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

Definition at line 24 of file date.php.

◆ $timestamp

$timestamp = $vars['timestamp']

Definition at line 33 of file date.php.

◆ $vars [1/3]

$vars = elgg_extract_class($vars, 'elgg-input-date')

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 @uses $vars['datepicker_options'] An array of options to pass to the jQuery UI datepicker

Definition at line 19 of file date.php.

◆ $vars [2/3]

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

Definition at line 22 of file date.php.

◆ $vars [3/3]

$vars[ 'data-datepicker-opts'] = $datepicker_options ? json_encode($datepicker_options) : ''

Definition at line 55 of file date.php.

◆ else

if (isset( $vars[ 'id'])) else
Initial value:
{
$selector = ".elgg-input-date[name='{$vars['name']}']"
$selector
Definition: filter.php:32

Definition at line 62 of file date.php.