PHP Class Prado\Web\UI\JuiControls\TJuiDatePicker

TJuiDatePicker is a textbox that provides a date input. When the text box receives focus, a calendar will pop up and users can pick up from it a date that will be automatically entered into the text box. TJuiDatePicker is an extension to {@link TActivePanel} based on jQuery-UI's {@link http://jqueryui.com/dialog/ Dialog} widget.
Since: 3.3
Author: LANDWEHR Computer und Software GmbH ([email protected])
Inheritance: extends Prado\Web\UI\ActiveControls\TActiveTextBox, implements Prado\Web\UI\INamingContainer, implements Prado\Web\UI\JuiControls\IJuiOptions
ファイルを表示 Open project: pradosoft/prado

Public Methods

Method Description
__construct ( ) Creates a new callback control, sets the adapter to TActiveControlAdapter. If you override this class, be sure to set the adapter appropriately by, for example, by calling this constructor.
getCulture ( ) : string Gets the current culture.
getData ( ) : integer Returns the timestamp selected by the user.
getDate ( ) : string
getDateFormat ( ) : string
getOptions ( ) : TJuiControlOptions Object containing defined javascript options
getTextMode ( ) : TTextBoxMode
getTimeStamp ( ) : integer
getValidEvents ( ) : array() Array containing valid javascript events
getValidOptions ( ) : array() Array containing valid javascript options
getValidationPropertyValue ( ) : integer Returns the value to be validated.
getWidget ( ) : string
getWidgetID ( ) : string
setCulture ( $value ) Sets the culture/language for the date picker.
setData ( $value ) Sets the timestamp represented by this control.
setDate ( $value )
setDateFormat ( $value ) Sets the format of the date string.
setTextMode ( $value ) Setting the behavior mode of the underlying TTextBox component is NOT supported.
setTimeStamp ( $value ) Sets the date for the date picker using timestamp.

Protected Methods

Method Description
addAttributesToRender ( $writer ) Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control. Also registers language specific global settings for the first used date picker.
getCurrentCulture ( ) : string
getTimeStampFromText ( ) : integer Gets the date from the text input using TSimpleDateFormatter

Method Details

__construct() public method

Creates a new callback control, sets the adapter to TActiveControlAdapter. If you override this class, be sure to set the adapter appropriately by, for example, by calling this constructor.
public __construct ( )

addAttributesToRender() protected method

Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control. Also registers language specific global settings for the first used date picker.
protected addAttributesToRender ( $writer )

getCulture() public method

Gets the current culture.
public getCulture ( ) : string
return string current culture, e.g. en_AU.

getCurrentCulture() protected method

protected getCurrentCulture ( ) : string
return string the current culture, falls back to application if culture is not set.

getData() public method

This method is required by {@link IDataRenderer}. It is the same as {@link getTimeStamp()}.
See also: getTimeStamp
Since: 3.1.2
public getData ( ) : integer
return integer the timestamp of the TDatePicker control.

getDate() public method

public getDate ( ) : string
return string the date string.

getDateFormat() public method

public getDateFormat ( ) : string
return string the format of the date string

getOptions() public method

Object containing defined javascript options
public getOptions ( ) : TJuiControlOptions
return TJuiControlOptions

getTextMode() public method

public getTextMode ( ) : TTextBoxMode
return Prado\Web\UI\WebControls\TTextBoxMode the behavior mode of the underlying {@link TTextBox} component. Fixed to TTextBoxMode::SingleLine for the TJuiDatePicker.

getTimeStamp() public method

public getTimeStamp ( ) : integer
return integer current selected date from the date picker as timestamp, NULL if timestamp is not set previously.

getTimeStampFromText() protected method

Gets the date from the text input using TSimpleDateFormatter
protected getTimeStampFromText ( ) : integer
return integer current selected date timestamp

getValidEvents() public method

Array containing valid javascript events
public getValidEvents ( ) : array()
return array()

getValidOptions() public method

Array containing valid javascript options
public getValidOptions ( ) : array()
return array()

getValidationPropertyValue() public method

This methid is required by IValidatable interface.
public getValidationPropertyValue ( ) : integer
return integer the interger timestamp if valid, otherwise the original text.

getWidget() public method

public getWidget ( ) : string
return string the name of the jQueryUI widget method

getWidgetID() public method

public getWidgetID ( ) : string
return string the clientid of the jQueryUI widget element

setCulture() public method

Sets the culture/language for the date picker.
public setCulture ( $value )

setData() public method

This method is required by {@link IDataRenderer}. It is the same as {@link setTimeStamp()}.
See also: setTimeStamp
Since: 3.1.2
public setData ( $value )

setDate() public method

public setDate ( $value )

setDateFormat() public method

Sets the format of the date string.
public setDateFormat ( $value )

setTextMode() public method

Setting the behavior mode of the underlying TTextBox component is NOT supported.
public setTextMode ( $value )

setTimeStamp() public method

Sets the date for the date picker using timestamp.
public setTimeStamp ( $value )