Class: TDatePicker
Source Location: /Web/UI/WebControls/TDatePicker.php
TComponent
|
--TControl
|
--TWebControl
|
--TTextBox
|
--TDatePicker
TDatePicker class
Class Details
[line 101]
TDatePicker class TDatePicker wraps the DHTML Calendar javascript developed by dynarch.com http://www.dynarch.com/projects/calendar/. TDatePicker displays a text box for date(time) input purpose. When the text box receives focus, a calendar will pop up and users can pick up from it a date(time) that will be automatically entered into the text box. By default, the calendar will only show dates. If the ShowTime property is set to true, the calendar will also show time that can be selected by users. 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, WARNING: Languages other than EN may not work. - %a abbreviated weekday name
- %A full weekday name
- %b abbreviated month name
- %B full month name
- %C century number
- %d the day of the month ( 00 .. 31 )
- %e the day of the month ( 0 .. 31 )
- %H hour ( 00 .. 23 )
- %I hour ( 01 .. 12 )
- %j day of the year ( 000 .. 366 )
- %k hour ( 0 .. 23 )
- %l hour ( 1 .. 12 )
- %m month ( 01 .. 12 )
- %M minute ( 00 .. 59 )
- %n a newline character
- %p ”°PM”± or ”°AM”±
- %P ”°pm”± or ”°am”±
- %S second ( 00 .. 59 )
- %s number of seconds since Epoch (since Jan 01 1970 00:00:00 UTC)
- %t a tab character
- %U, %W, %V the week number
- %u the day of the week ( 1 .. 7, 1 = MON )
- %w the day of the week ( 0 .. 6, 0 = SUN )
- %y year without the century ( 00 .. 99 )
- %Y year including the century ( ex. 1979 )
- %% a literal % character
For example, the format "%m/%d/%y" will show the date Dec. 31, 2004 as "12/31/04". In case you do not want to show calendar at all, set the ShowCalendar property to false. Note, you can set the ReadOnly property to true so that users cannot update the content in the textbox directly. The content can still be changed by picking up date from the calendar, though. Set Enabled to false to totally forbid editting the text box. Note, to use this component, you have to copy the directory "<framework>/js/datepicker" to the "js" directory which should be under the directory containing the entry script file. Namespace: System.Web.UI.WebControls Properties - DateFormat, string, default="%m/%d/%Y", kept in viewstate
Gets or sets the format that the date should be displayed - ShowCalendar, boolean, default=true, kept in viewstate
Gets or sets whether the calendar window should pop up when the control receives focus. - ShowTime, boolean, default=false, kept in viewstate
Gets or sets whether the calendar window will allow selection of time.
Compatibility - The calendar javascript is supported by Internet Explorer 5.0+ for Windows,
Mozilla, Netscape 7.x, Mozilla FireFox (any platform), Other Gecko-based browsers (any platform) Konqueror 3.2+ for Linux and Apple Safari for Macintosh Opera 7+ (any platform)
|
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Variables
Class Methods
Class Constants
|
|