DCX - Dialog Control Xtension
 
DateTime Picker
The DateTime Picker control allows users to select a date or time in a neat way, automatically enclosing the calendar control and also providing UpDown spinners on date/time values.

It is highly recommended that you familiarise yourself with how the mIRC functions $ctime and $asctime() functions work before using this control.


Control Styles
These control styles are available when creating a DateTime Picker control. Remember that the general styles disabled, group, hidden, notheme, tabstop and transparent apply to all DCX controls except the embedded Dialog and Window controls.
longdateformat The date will be displayed in a long format, which produces a result like Friday, April 19, 1996.
right The text value will be aligned to the right.
shortdatecenturyformat The date will be similar to the shortdateformat, however the result will include the century like 4/19/1996.
shortdateformat The date will be displayed in a short format, which produces a result like 4/19/96.
shownone It is possible to have no date selected in the control. The user MUST select the checkbox, otherwise it will return no date.
timeformat Displays the time like 5:31:42 PM.
updown Places an up-down control to the right of the DTP control to modify date-time values.

/xdid flags
Control commands are input to the control with the /xdid command.
/xdid -f
This command lets you set format of the DateTime Picker text.
Syntax:
/xdid -f [DNAME] [ID] [FORMAT]
Example:
/xdid -f dcx 4 'Right now it is: 'hh':'m':'s ddddMMMdd', 'yyy
Parameters:
FORMAT Date time format options.
d The one- or two-digit day.
dd The two-digit day. Single-digit day values are preceded by a zero.
ddd The three-character weekday abbreviation.
dddd The full weekday name.
h The one- or two-digit hour in 12-hour format.
hh The two-digit hour in 12-hour format. Single-digit values are preceded by a zero.
H The one- or two-digit hour in 24-hour format.
HH The two-digit hour in 24-hour format. Single-digit values are preceded by a zero.
m The one- or two-digit minute.
mm The two-digit minute. Single-digit values are preceded by a zero.
M The one- or two-digit month number.
MM The two-digit month number. Single-digit values are preceded by a zero.
MMM The three-character month abbreviation.
MMMM The full month name.
t The one-letter AM/PM abbreviation (that is, AM is displayed as "A").
tt The two-letter AM/PM abbreviation (that is, AM is displayed as "AM").
yy The last two digits of the year (that is, 1996 would be displayed as "96").
yyyy The full year (that is, 1996 would be displayed as "1996").
 
Note.
  • Any non-format characters must be enclosed within single quotes.
  • A DTP control tracks locale changes when it is using the default format string.

/xdid -r
This command lets you set the range of the first and last selectable dates.
Syntax:
/xdid -r [DNAME] [ID] [MIN_TIMESTAMP] [MAX_TIMESTAMP]
Example:
/xdid -r dcx 4 $ctime(3rd July 2006) $ctime
/xdid -r dcx 4 nolimit $ctime
 
Note. You can use nolimit for MIN_TIMESTAMP or MAX_TIMESTAMP if you wish to specify no minimum or maximum date range respectively.

/xdid -t
This command lets you set the selected date/time.
Syntax:
/xdid -t [DNAME] [ID] [TIMESTAMP]
Example:
/xdid -t dcx 4 $ctime(3rd July 3006)
 
Note. You can use reset for TIMESTEMP to set it back to the current date/time, but this only applies to the shownone style.

$xdid() Properties
The $xdid identifier is a given mIRC alias that communicates with the DCX DLL to extract information in DCX controls.
$xdid().range
This property lets you retreive the date/time range.
Syntax:
$xdid(dialog, ID).range
Example:
$xdid(dcx, 4).range
 
Note. nolimit is returned when the calendar range is not bounded.

$xdid().value
This property lets you retreive the selected date/time.
Syntax:
$xdid(dialog, ID).value
Example:
$xdid(dcx, 4).value

DateTime Picker Events
These events are fired when activity occurs in the DateTime Picker control.
change
When the date/time selection has changed.
Syntax:
/cb_alias DNAME change ID SELECTION
Example:
/cb_alias dcx change 4 1152622371
/cb_alias dcx change 4 none
Parameters:
SELECTION The date selected. If this value is none, then the date has been cleared.
 
Note. SELECTION can only be none when the shownone style is used.

closed
The dropdown calendar was closed.
Syntax:
/cb_alias DNAME closed ID
Example:
/cb_alias dcx closed 4

open
The dropdown calendar was opened.
Syntax:
/cb_alias DNAME open ID
Example:
/cb_alias dcx open 4

Contact � 2005-2009 Last Updated: 12th July, 09

Valid XHTML 1.0 Transitional Valid CSS!