- Home
- About
- Testimonials
- Demos
- Download
- Documentation
- Blogs
- Forum
- Support

Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml
Classes:
IDataSource
IItemDataRenderer
IRepeatInfoUser
TActiveFileUpload
TBaseDataList
TBaseValidator
TBoundColumn
TBulletedList
TBulletedListDisplayMode
TBulletedListEventParameter
TBulletStyle
TButton
TButtonColumn
TButtonColumnType
TButtonType
TCaptcha
TCaptchaValidator
TCheckBox
TCheckBoxColumn
TCheckBoxList
TCircleHotSpot
TClientScript
TClientScriptLoader
TClientSideValidationSummaryOptions
TColorPicker
TColorPickerClientSide
TColorPickerMode
TCompareValidator
TCompleteWizardStep
TConditional
TContent
TContentDirection
TContentPlaceHolder
TCustomValidator
TDataBoundControl
TDataGrid
TDataGridColumn
TDataGridColumnCollection
TDataGridCommandEventParameter
TDataGridItem
TDataGridItemCollection
TDataGridItemEventParameter
TDataGridItemRenderer
TDataGridPageChangedEventParameter
TDataGridPager
TDataGridPagerButtonType
TDataGridPagerEventParameter
TDataGridPagerMode
TDataGridPagerPosition
TDataGridPagerStyle
TDataGridSortCommandEventParameter
TDataList
TDataListCommandEventParameter
TDataListItem
TDataListItemCollection
TDataListItemEventParameter
TDataListItemRenderer
TDataRenderer
TDataSourceControl
TDataSourceSelectParameters
TDataSourceView
TDataTypeValidator
TDatePicker
TDatePickerClientScript
TDatePickerInputMode
TDatePickerMode
TDatePickerPositionMode
TDisplayStyle
TDraggable
TDropContainer
TDropDownList
TDropDownListColumn
TEditCommandColumn
TEmailAddressValidator
TExpression
TFileUpload
TFont
THiddenField
THorizontalAlign
THotSpot
THotSpotCollection
THotSpotMode
THtmlArea
THtmlElement
THyperLink
THyperLinkColumn
TImage
TImageButton
TImageClickEventParameter
TImageMap
TImageMapEventParameter
TInlineFrame
TInlineFrameAlign
TInlineFrameScrollBars
TItemDataRenderer
TJavascriptLogger
TKeyboard
TLabel
TLinkButton
TListBox
TListControl
TListControlValidator
TListItem
TListItemCollection
TListItemType
TListSelectionMode
TLiteral
TLiteralColumn
TMarkdown
TMetaTag
TMetaTagCollection
TMultiView
TOutputCache
TOutputCacheCalculateKeyEventParameter
TOutputCacheCheckDependencyEventParameter
TPager
TPagerButtonType
TPagerMode
TPagerPageChangedEventParameter
TPanel
TPanelStyle
TPlaceHolder
TPolygonHotSpot
TRadioButton
TRadioButtonList
TRangeValidationDataType
TRangeValidator
TRatingList
TReadOnlyDataSource
TReadOnlyDataSourceView
TRectangleHotSpot
TRegularExpressionValidator
TRepeatDirection
TRepeater
TRepeaterCommandEventParameter
TRepeaterItem
TRepeaterItemCollection
TRepeaterItemEventParameter
TRepeaterItemRenderer
TRepeatInfo
TRepeatLayout
TRequiredFieldValidator
TSafeHtml
TScrollBars
TServerValidateEventParameter
TSlider
TSliderClientScript
TSliderDirection
TStatements
TStyle
TStyleSheet
TTable
TTableCaptionAlign
TTableCell
TTableCellCollection
TTableFooterRow
TTableGridLines
TTableHeaderCell
TTableHeaderRow
TTableHeaderScope
TTableItemStyle
TTableRow
TTableRowCollection
TTableRowSection
TTableStyle
TTabPanel
TTabView
TTabViewCollection
TTemplateColumn
TTemplatedWizardStep
TTextAlign
TTextBox
TTextBoxAutoCompleteType
TTextBoxMode
TTextHighlighter
TTextHighlighterLineNumberStyle
TValidationCompareOperator
TValidationDataType
TValidationSummary
TValidationSummaryDisplayMode
TValidationSummaryDisplayStyle
TValidatorClientSide
TValidatorDisplayStyle
TVerticalAlign
TView
TViewCollection
TWebControl
TWebControlAdapter
TWizard
TWizardFinishNavigationTemplate
TWizardNavigationButtonStyle
TWizardNavigationButtonType
TWizardNavigationContainer
TWizardNavigationEventParameter
TWizardNavigationTemplate
TWizardSideBarListItemTemplate
TWizardSideBarTemplate
TWizardStartNavigationTemplate
TWizardStep
TWizardStepCollection
TWizardStepNavigationTemplate
TWizardStepType
TXmlTransform

Keyword

# Class TDatePicker

    TComponent
       |
       --TApplicationComponent
          |
          --TControl
             |
             --TWebControl
                |
                --TTextBox
                   |
                   --TDatePicker

#### Direct Known Sub-classes:

TActiveDatePicker

TDatePicker class.

TDatePicker displays a text box for date input purpose. 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. The format of the date string displayed in the text box is determined by the DateFormat property. Valid formats are the combination of the following tokens,

      Character Format Pattern (en-US)
      -----------------------------------------
      d          day digit
      dd         padded day digit e.g. 01, 02
      M          month digit
      MM         padded month digit
      MMMM       localized month name, e.g. March, April
      yy         2 digit year
      yyyy       4 digit year
      -----------------------------------------

TDatePicker has three Mode to show the date picker popup.

- Basic -- Only shows a text input, focusing on the input shows the date picker.
- Button -- Shows a button next to the text input, clicking on the button shows the date, button text can be by the ButtonText property
- ImageButton -- Shows an image next to the text input, clicking on the image shows the date picker, image source can be change through the ButtonImageUrl property.

The CssClass property can be used to override the css class name for the date picker panel. CalendarStyle property sets the packages styles available. E.g. default.

The InputMode property can be set to "TextBox" or "DropDownList" with default as "TextBox". In <tt>DropDownList</tt> mode, in addition to the popup date picker, three drop down list (day, month and year) are presented to select the date .

The PositionMode property can be set to "Top" or "Bottom" with default as "Bottom". It specifies the position of the calendar popup, relative to the input field.

Since: 3.0
Author: Wei Zhuo <weizhuo[at]gmail[dot]com>
Author: Carl G. Mathisen <carlgmathisen@gmail.com>

Constants Inherited From TTextBox
DEFAULT_COLUMNS, DEFAULT_ROWS,

Constants Inherited From TControl

AUTOMATIC_ID_PREFIX, CLIENT_ID_SEPARATOR, CS_CHILD_INITIALIZED, CS_CONSTRUCTED, CS_INITIALIZED, CS_LOADED, CS_PRERENDERED, CS_STATE_LOADED, ID_FORMAT, ID_SEPARATOR, IS_CHILD_CREATED, IS_CREATING_CHILD, IS_DISABLE_THEMING, IS_DISABLE_VIEWSTATE, IS_ID_SET, IS_SKIN_APPLIED, IS_STYLESHEET_APPLIED, RF_ADAPTER, RF_AUTO_BINDINGS, RF_CHILD_STATE, RF_CONTROLS, RF_CONTROLSTATE, RF_DATA_BINDINGS, RF_EVENTS, RF_NAMED_CONTROLS, RF_NAMED_CONTROLS_ID, RF_NAMED_OBJECTS, RF_SKIN_ID,

Method Summary
protected void | addAttributesToRender ( THtmlWriter $writer) Add the client id to the input textbox, and register the client scripts.
protected TDatePickerClientScript | createClientScript ()
protected string | getAssetUrl ( string $file)
string | getButtonImageUrl ()
string | getButtonText ()
string | getCalendarStyle ()
TDatePickerClientScript | getClientSide () Gets the TDatePickerClientScript to set the TDatePicker event handlers.
protected array | getCulturalOptions () Get javascript localization options, e.g. month and weekday names.
string | getCulture () Gets the current culture.
protected string | getCurrentCulture ()
integer | getData () Returns the timestamp selected by the user.
string | getDate ()
string | getDateFormat ()
protected array | getDateFromPostData ( string $key, array $values) Loads date from drop down list data.
protected string | getDatePickerButtonID () Gets the ID for the date picker trigger button.
protected array | getDatePickerOptions () Get javascript date picker options.
protected array | getDropDownDayOptions ()
integer | getFirstDayOfWeek ()
integer | getFromYear ()
TDatePickerInputMode | getInputMode ()
protected DateTimeFormatInfo | getLocalizedCalendarInfo ()
protected array | getLocalizedMonthNames ( DateTimeFormatInfo $info) Returns the localized month names that depends on the month format pattern.
TDatePickerMode | getMode ()
TDatePickerPositionMode | getPositionMode ()
boolean | getShowCalendar ()
integer | getTimeStamp ()
protected integer | getTimeStampFromText () Gets the date from the text input using TSimpleDateFormatter
integer | getUpToYear ()
integer | getValidationPropertyValue () Returns the value to be validated.
protected void | hasDayPattern ()
boolean | loadPostData ( string $key, array $values) Loads user input data. Override parent implementation, when InputMode is DropDownList call getDateFromPostData to get date data.
void | onPreRender ( mixed $param) Publish the date picker Css asset files.
protected string | publishCalendarStyle () Publish the calendar style Css asset file.
protected void | registerCalendarClientScript () Registers the javascript code to initialize the date picker.
void | render ( THtmlWriter $writer) Renders body content.
protected THtmlWriter | renderButtonDatePicker ( mixed $writer) Adds an additional button such that when clicked it shows the date picker.
protected void | renderCalendarDayOptions ( THtmlWriter $writer, mixed $selected) Renders the day drop down list options.
protected void | renderCalendarMonthOptions ( THtmlWriter $writer, mixed $selected) Renders the month drop down list options.
protected void | renderCalendarSelections ( THtmlWriter $writer, array $date) Renders the calendar drop down list depending on the DateFormat pattern.
protected void | renderCalendarYearOptions ( THtmlWriter $writer, mixed $selected) Renders the year drop down list options.
protected void | renderDatePickerButtons ( mixed $writer) Renders the date picker popup buttons.
protected void | renderDropDownListCalendar ( mixed $writer) Renders the drop down list date picker.
protected THtmlWriter | renderImageButtonDatePicker ( mixed $writer) Adds an additional image button such that when clicked it shows the date picker.
void | setAutoPostBack ( mixed $value) AutoPostBack is not supported.
void | setButtonImageUrl ( string $value)
void | setButtonText ( string $value)
void | setCalendarStyle ( string $value)
void | setCulture ( string $value) Sets the culture/language for the date picker.
void | setData ( integer $value) Sets the timestamp represented by this control.
void | setDate ( string $value)
void | setDateFormat ( string $value) Sets the format of the date string.
void | setFirstDayOfWeek ( integer $value) Set the first day of week, with 0 as Sunday, 1 as Monday, etc.
void | setFromYear ( integer $value)
void | setInputMode ( TDatePickerInputMode $value)
void | setMode ( TDatePickerMode $value)
void | setPositionMode ( TDatePickerPositionMode $value)
void | setShowCalendar ( boolean $value) Sets whether to pop up the calendar window when the control receives focus
void | setTimeStamp ( float $value) Sets the date for the date picker using timestamp.
void | setUpToYear ( integer $value)

Methods Inherited From TTextBox

TTextBox::addAttributesToRender(), TTextBox::getAutoCompleteType(), TTextBox::getAutoPostBack(), TTextBox::getAutoTrim(), TTextBox::getCausesValidation(), TTextBox::getClientClassName(), TTextBox::getColumns(), TTextBox::getData(), TTextBox::getDataChanged(), TTextBox::getEnableClientScript(), TTextBox::getIsValid(), TTextBox::getMaxLength(), TTextBox::getPersistPassword(), TTextBox::getPostBackOptions(), TTextBox::getReadOnly(), TTextBox::getRows(), TTextBox::getSafeText(), TTextBox::getSafeTextParser(), TTextBox::getTagName(), TTextBox::getText(), TTextBox::getTextMode(), TTextBox::getValidationGroup(), TTextBox::getValidationPropertyValue(), TTextBox::getWrap(), TTextBox::loadPostData(), TTextBox::onTextChanged(), TTextBox::raisePostDataChangedEvent(), TTextBox::renderClientControlScript(), TTextBox::renderContents(), TTextBox::setAutoCompleteType(), TTextBox::setAutoPostBack(), TTextBox::setAutoTrim(), TTextBox::setCausesValidation(), TTextBox::setColumns(), TTextBox::setData(), TTextBox::setEnableClientScript(), TTextBox::setIsValid(), TTextBox::setMaxLength(), TTextBox::setPersistPassword(), TTextBox::setReadOnly(), TTextBox::setRows(), TTextBox::setText(), TTextBox::setTextMode(), TTextBox::setValidationGroup(), TTextBox::setWrap()

Methods Inherited From TWebControl

TWebControl::addAttributesToRender(), TWebControl::clearStyle(), TWebControl::copyBaseAttributes(), TWebControl::createStyle(), TWebControl::getAccessKey(), TWebControl::getBackColor(), TWebControl::getBorderColor(), TWebControl::getBorderStyle(), TWebControl::getBorderWidth(), TWebControl::getCssClass(), TWebControl::getDisplay(), TWebControl::getFont(), TWebControl::getForeColor(), TWebControl::getHasStyle(), TWebControl::getHeight(), TWebControl::getStyle(), TWebControl::getTabIndex(), TWebControl::getTagName(), TWebControl::getToolTip(), TWebControl::getWidth(), TWebControl::render(), TWebControl::renderBeginTag(), TWebControl::renderContents(), TWebControl::renderEndTag(), TWebControl::setAccessKey(), TWebControl::setBackColor(), TWebControl::setBorderColor(), TWebControl::setBorderStyle(), TWebControl::setBorderWidth(), TWebControl::setCssClass(), TWebControl::setDisplay(), TWebControl::setForeColor(), TWebControl::setHeight(), TWebControl::setStyle(), TWebControl::setTabIndex(), TWebControl::setToolTip(), TWebControl::setWidth()

Methods Inherited From TControl

TControl::addedControl(), TControl::addParsedObject(), TControl::addToPostDataLoader(), TControl::applyStyleSheetSkin(), TControl::autoBindProperty(), TControl::autoDataBindProperties(), TControl::bindProperty(), TControl::broadcastEvent(), TControl::bubbleEvent(), TControl::clearChildState(), TControl::clearControlState(), TControl::clearNamingContainer(), TControl::clearViewState(), TControl::convertUniqueIdToClientId(), TControl::createChildControls(), TControl::createControlCollection(), TControl::dataBind(), TControl::dataBindChildren(), TControl::dataBindProperties(), TControl::ensureChildControls(), TControl::findControl(), TControl::findControlsByID(), TControl::findControlsByType(), TControl::focus(), TControl::getAdapter(), TControl::getAllowChildControls(), TControl::getAttribute(), TControl::getAttributes(), TControl::getChildControlsCreated(), TControl::getClientID(), TControl::getControls(), TControl::getControlStage(), TControl::getControlState(), TControl::getCustomData(), TControl::getEnabled(), TControl::getEnableTheming(), TControl::getEnableViewState(), TControl::getHasAdapter(), TControl::getHasAttributes(), TControl::getHasChildInitialized(), TControl::getHasControls(), TControl::getHasInitialized(), TControl::getHasLoaded(), TControl::getHasLoadedPostData(), TControl::getHasPreRendered(), TControl::getID(), TControl::getNamingContainer(), TControl::getPage(), TControl::getParent(), TControl::getRegisteredObject(), TControl::getSkinID(), TControl::getSourceTemplateControl(), TControl::getTemplateControl(), TControl::getUniqueID(), TControl::getViewState(), TControl::getVisible(), TControl::hasAttribute(), TControl::initRecursive(), TControl::isDescendentOf(), TControl::isObjectRegistered(), TControl::loadRecursive(), TControl::loadState(), TControl::loadStateRecursive(), TControl::onDataBinding(), TControl::onInit(), TControl::onLoad(), TControl::onPreRender(), TControl::onUnload(), TControl::preRenderRecursive(), TControl::raiseBubbleEvent(), TControl::registerObject(), TControl::removeAttribute(), TControl::removedControl(), TControl::render(), TControl::renderChildren(), TControl::renderControl(), TControl::saveState(), TControl::saveStateRecursive(), TControl::setAdapter(), TControl::setAttribute(), TControl::setChildControlsCreated(), TControl::setControlStage(), TControl::setControlState(), TControl::setCustomData(), TControl::setEnabled(), TControl::setEnableTheming(), TControl::setEnableViewState(), TControl::setID(), TControl::setPage(), TControl::setSkinID(), TControl::setTemplateControl(), TControl::setViewState(), TControl::setVisible(), TControl::trackViewState(), TControl::traverseChildControls(), TControl::unbindProperty(), TControl::unloadRecursive(), TControl::unregisterObject(), TControl::__get()

Methods Inherited From TApplicationComponent
TApplicationComponent::getApplication(), TApplicationComponent::getRequest(), TApplicationComponent::getResponse(), TApplicationComponent::getService(), TApplicationComponent::getSession(), TApplicationComponent::getUser(), TApplicationComponent::publishAsset(), TApplicationComponent::publishFilePath()

Methods Inherited From TComponent

TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()

Constant Summary
string | SCRIPT_PATH | Script path relative to the TClientScriptManager::SCRIPT_PATH

Method Details

## addAttributesToRender

protected void addAttributesToRender | (THtmlWriter $writer )

Add the client id to the input textbox, and register the client scripts.

Input
THtmlWriter | $writer | writer
Output
Exception

## createClientScript

protected TDatePickerClientScript createClientScript | ()

Output
TDatePickerClientScript | javascript validator event options.
Exception

## getAssetUrl

protected string getAssetUrl | (string $file )

Input
string | $file | date picker asset file in the self::SCRIPT_PATH directory.
Output
string | date picker asset url.
Exception

## getButtonImageUrl

public string getButtonImageUrl | ()

Output
string | the image url for "Image" UI mode.
Exception

## getButtonText

public string getButtonText | ()

Output
string | text for the date picker button. Default is "...".
Exception

## getCalendarStyle

public string getCalendarStyle | ()

Output
string | current calendar style
Exception

## getClientSide

public TDatePickerClientScript getClientSide | ()

Gets the TDatePickerClientScript to set the TDatePicker event handlers.

The date picker on the client-side supports the following events.

- <tt>OnDateChanged</tt> -- raised when the date is changed.

You can attach custom javascript code to each of these events

Output
TDatePickerClientScript | javascript validator event options.
Exception

## getCulturalOptions

protected array getCulturalOptions | ()

Get javascript localization options, e.g. month and weekday names.

Output
array | localization options.
Exception

## getCulture

public string getCulture | ()

Gets the current culture.

Output
string | current culture, e.g. en_AU.
Exception

## getCurrentCulture

protected string getCurrentCulture | ()

Output
string | the current culture, falls back to application if culture is not set.
Exception

## getData

public integer getData | ()

Returns the timestamp selected by the user.

This method is required by IDataRenderer. It is the same as getTimeStamp().

Output
integer | the timestamp of the TDatePicker control.
Exception

## getDate

public string getDate | ()

Output
string | the date string.
Exception

## getDateFormat

public string getDateFormat | ()

Output
string | the format of the date string
Exception

## getDateFromPostData

protected array getDateFromPostData | (string $key , array $values )

Loads date from drop down list data.

Input
string | $key | the key that can be used to retrieve data from the input data collection
array | $values | the input data collection
Output
array | the date selected
Exception

## getDatePickerButtonID

protected string getDatePickerButtonID | ()

Gets the ID for the date picker trigger button.

Output
string | unique button ID
Exception

## getDatePickerOptions

protected array getDatePickerOptions | ()

Get javascript date picker options.

Output
array | date picker client-side options
Exception

## getDropDownDayOptions

protected array getDropDownDayOptions | ()

Output
array | list of day options for a drop down list.
Exception

## getFirstDayOfWeek

public integer getFirstDayOfWeek | ()

Output
integer | first day of the week
Exception

## getFromYear

public integer getFromYear | ()

Output
integer | date picker starting year, default is -5 years
Exception

## getInputMode

public TDatePickerInputMode getInputMode | ()

Output
TDatePickerInputMode | input method of date values. Defaults to TDatePickerInputMode::TextBox.
Exception

## getLocalizedCalendarInfo

protected DateTimeFormatInfo getLocalizedCalendarInfo | ()

Output
DateTimeFormatInfo | date time format information for the current culture.
Exception

## getLocalizedMonthNames

protected array getLocalizedMonthNames | (DateTimeFormatInfo $info )

Returns the localized month names that depends on the month format pattern.

"MMMM" will return the month names, "MM" or "MMM" return abbr. month names and "M" return month digits.

Input
DateTimeFormatInfo | $info | localized date format information.
Output
array | localized month names.
Exception

## getMode

public TDatePickerMode getMode | ()

Output
TDatePickerMode | current calendar UI mode.
Exception

## getPositionMode

public TDatePickerPositionMode getPositionMode | ()

Output
TDatePickerPositionMode | current calendar UI position.
Exception

## getShowCalendar

public boolean getShowCalendar | ()

Output
boolean | whether the calendar window should pop up when the control receives focus
Exception

## getTimeStamp

public integer getTimeStamp | ()

Output
integer | current selected date from the date picker as timestamp, NULL if timestamp is not set previously.
Exception

## getTimeStampFromText

protected integer getTimeStampFromText | ()

Gets the date from the text input using TSimpleDateFormatter

Output
integer | current selected date timestamp
Exception

## getUpToYear

public integer getUpToYear | ()

Output
integer | date picker ending year, default +10 years
Exception

## getValidationPropertyValue

public integer getValidationPropertyValue | ()

Returns the value to be validated.

This methid is required by IValidatable interface.

Output
integer | the interger timestamp if valid, otherwise the original text.
Exception

## hasDayPattern

protected void hasDayPattern | ()

Output
Exception

## loadPostData

public boolean loadPostData | (string $key , array $values )

Loads user input data. Override parent implementation, when InputMode is DropDownList call getDateFromPostData to get date data.

This method is primarly used by framework developers.

Input
string | $key | the key that can be used to retrieve data from the input data collection
array | $values | the input data collection
Output
boolean | whether the data of the component has been changed
Exception

## onPreRender

public void onPreRender | (mixed $param )

Publish the date picker Css asset files.

Input
mixed | $param |
Output
Exception

## publishCalendarStyle

protected string publishCalendarStyle | ()

Publish the calendar style Css asset file.

Output
string | Css file url.
Exception

## registerCalendarClientScript

protected void registerCalendarClientScript | ()

Registers the javascript code to initialize the date picker.

Output
Exception

## render

public void render | (THtmlWriter $writer )

Renders body content.

This method overrides parent implementation by adding additional date picker button if Mode is Button or ImageButton.

Input
THtmlWriter | $writer | writer
Output
Exception

## renderButtonDatePicker

protected THtmlWriter renderButtonDatePicker | (mixed $writer )

Adds an additional button such that when clicked it shows the date picker.

Input
mixed | $writer |
Output
THtmlWriter | writer
Exception

## renderCalendarDayOptions

protected void renderCalendarDayOptions | (THtmlWriter $writer , mixed $selected )

Renders the day drop down list options.

Input
THtmlWriter | $writer | the writer used for the rendering purpose
mixed | $selected | selected day.
Output
Exception

## renderCalendarMonthOptions

protected void renderCalendarMonthOptions | (THtmlWriter $writer , mixed $selected )

Renders the month drop down list options.

Input
THtmlWriter | $writer | the writer used for the rendering purpose
mixed | $selected | selected month.
Output
Exception

## renderCalendarSelections

protected void renderCalendarSelections | (THtmlWriter $writer , array $date )

Renders the calendar drop down list depending on the DateFormat pattern.

Input
THtmlWriter | $writer | the Html writer to render the drop down lists.
array | $date | the current selected date
Output
Exception

## renderCalendarYearOptions

protected void renderCalendarYearOptions | (THtmlWriter $writer , mixed $selected )

Renders the year drop down list options.

Input
THtmlWriter | $writer | the writer used for the rendering purpose
mixed | $selected | selected year.
Output
Exception

## renderDatePickerButtons

protected void renderDatePickerButtons | (mixed $writer )

Renders the date picker popup buttons.

Input
mixed | $writer |
Output
Exception

## renderDropDownListCalendar

protected void renderDropDownListCalendar | (mixed $writer )

Renders the drop down list date picker.

Input
mixed | $writer |
Output
Exception

## renderImageButtonDatePicker

protected THtmlWriter renderImageButtonDatePicker | (mixed $writer )

Adds an additional image button such that when clicked it shows the date picker.

Input
mixed | $writer |
Output
THtmlWriter | writer
Exception

## setAutoPostBack

public void setAutoPostBack | (mixed $value )

AutoPostBack is not supported.

Input
mixed | $value |
Output
Exception

## setButtonImageUrl

public void setButtonImageUrl | (string $value )

Input
string | $value | the image url for "Image" UI mode.
Output
Exception

## setButtonText

public void setButtonText | (string $value )

Input
string | $value | text for the date picker button
Output
Exception

## setCalendarStyle

public void setCalendarStyle | (string $value )

Input
string | $value | set the calendar style
Output
Exception

## setCulture

public void setCulture | (string $value )

Sets the culture/language for the date picker.

Input
string | $value | a culture string, e.g. en_AU.
Output
Exception

## setData

public void setData | (integer $value )

Sets the timestamp represented by this control.

This method is required by IDataRenderer. It is the same as setTimeStamp().

Input
integer | $value | the timestamp of the TDatePicker control.
Output
Exception

## setDate

public void setDate | (string $value )

Input
string | $value | date string
Output
Exception

## setDateFormat

public void setDateFormat | (string $value )

Sets the format of the date string.

Input
string | $value | the format of the date string
Output
Exception

## setFirstDayOfWeek

public void setFirstDayOfWeek | (integer $value )

Set the first day of week, with 0 as Sunday, 1 as Monday, etc.

Input
integer | $value | 0 for Sunday, 1 for Monday, 2 for Tuesday, etc.
Output
Exception

## setFromYear

public void setFromYear | (integer $value )

Input
integer | $value | date picker starting year, default is 2000.
Output
Exception

## setInputMode

public void setInputMode | (TDatePickerInputMode $value )

Input
TDatePickerInputMode | $value | input method of date values
Output
Exception

## setMode

public void setMode | (TDatePickerMode $value )

Input
TDatePickerMode | $value | calendar UI mode
Output
Exception

## setPositionMode

public void setPositionMode | (TDatePickerPositionMode $value )

Input
TDatePickerPositionMode | $value | calendar UI position
Output
Exception

## setShowCalendar

public void setShowCalendar | (boolean $value )

Sets whether to pop up the calendar window when the control receives focus

Input
boolean | $value | whether to show the calendar window
Output
Exception

## setTimeStamp

public void setTimeStamp | (float $value )

Sets the date for the date picker using timestamp.

Input
float | $value | time stamp for the date picker
Output
Exception

## setUpToYear

public void setUpToYear | (integer $value )

Input
integer | $value | date picker ending year, default +10 years
Output
Exception

Constant Details

### SCRIPT_PATH

Script path relative to the TClientScriptManager::SCRIPT_PATH

#### Type:

string

#### Value:

'prado/datepicker'