@...DATEPICKER DEFINE DATEPICKER Creates a datepicker control.
|
A DatePicker control provides a simple and intuitive interface through which to exchange date information with a user.
SYNTAX
Standard Window:
@ <nRow> ,<nCol> DATEPICKER <ControlName>
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ VALUE <dValue> ]
[ FIELD <FieldName> ]
[ WIDTH <nWidth> ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ TITLEBACKCOLOR <aTitleBackColor> ]
[ TITLEFONTCOLOR <aTitleFontColor> ]
[ TRAILINGFONTCOLOR <trlfontclr> ]
[ SHOWNONE ]
[ UPDOWN ]
[ RIGHTALIGN ]
[ DATEFORMAT <cDateFormat> ] // (* - see decription below)
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ HELPID <nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]
Dialog Window:
REDEFINE DATEPICKER <ControlName>
ID <nId>]
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ VALUE <dValue> ]
[ FIELD <FieldName> ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ TITLEBACKCOLOR <aTitleBackColor> ]
[ TITLEFONTCOLOR <aTitleFontColor> ]
[ TRAILINGFONTCOLOR <trlfontclr> ]
[ RANGE <dRangeMin> , <dRangeMax> ]
[ SHOWNONE ]
[ UPDOWN ]
[ RIGHTALIGN ]
[ DATEFORMAT <cDateFormat> ] // (* - see decription below)
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ HELPID <nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]
Alternate Syntax:
DEFINE DATEPICKER <ControlName>
[ ID <nId> ]
[ PARENT <ParentWindowName> ]
COL <nCol>
ROW <nRow>
[ VALUE <dValue> ]
[ FIELD <FieldName> ]
[ WIDTH <nWidth> ]
[ FONTNAME <cFontname>
[ FONTSIZE <nFontsize> ]
[ FONTBOLD < .T. | .F.> ]
[ FONTITALIC < .T. | .F.> ]
[ FONTUNDERLINE < .T. | .F.> ]
[ FONTSTRIKEOUT < .T. | .F.> ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ TITLEBACKCOLOR <aTitleBackColor> ]
[ TITLEFONTCOLOR <aTitleFontColor> ]
[ TRAILINGFONTCOLOR <trlfontclr> ]
[ RANGEMIN <dRangeMin> ]
[ RANGEMAX <dRangeMax> ]
[ SHOWNONE < .T. | .F.> ]
[ UPDOWN < .T. | .F.> ]
[ RIGHTALIGN < .T. | .F.> ]
[ DATEFORMAT <cDateFormat> ]
[ ONGOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ONCHANGE <OnChangeProcedure> | <bBlock> ]
[ ONLOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ONENTER <OnEnterProcedure> | <bBlock> ]
[ HELPID <nHelpId> ]
[ INVISIBLE < .T. | .F.> ]
[ NOTABSTOP < .T. | .F.> ]
END DATEPICKER
PROPERTIES:
Set / Gets DatePicker value.
| |
Set / Gets enabled state of a DatePicker control
| |
Set / Gets visible a DatePicker control.
| |
Set / Gets row position of a DatePicker control.
| |
Set / Gets column position of a DatePicker control.
| |
Set / Gets width of a DatePicker control.
| |
Set / Gets height of a DatePicker control.
| |
Set / Gets DatePicker control's font name.
| |
Set / Gets DatePicker control's font size.
| |
Set / Gets DatePicker control's font bold property
| |
Set / Gets DatePicker control's font italic property
| |
Set / Gets DatePicker control's font underline property
| |
Set / Gets DatePicker control's font strikeout property
| |
Set / Gets DatePicker control's tooltip text.
| |
Set / Gets user property 'Cargo' for DatePicker control
| |
Set / Gets the format string of a DatePicker control.
| |
Set / Gets range max of a DatePicker control.
| |
Set / Gets range min of a DatePicker control.
| |
Retrieves the name of a DatePicker control.
| |
· Parent (D)
|
Set the name as character identifier of the parent window.
|
Set the numeric help topic identifier of the control.
| |
· NoTabStop (D)
|
Sets whether an element behavior can't receive focus and participate
in the tabbing sequence
|
· Field (D)
|
Set the Field data of active database.
|
· ShowNone (D)
|
The control displays a check box that is automatically selected
whenever a date is picked or entered
|
· UpDown (D)
|
The user can select a specific date by clicking an area of the calendar.
|
· RightAlign (D)
|
The drop-down month calendar will be right-aligned with the control
|
D: Available
at control definition only
R: Read-Only
*) see decription below
EVENTS:
An action to be performed when getting the focus
| |
An action to be performed when generic changing of the control
| |
An action to be performed when losing the focus.
|
METHODS:
Shows a DatePicker control
| |
Hides a DatePicker control
| |
Gives the focus to a DatePicker control
| |
Releases a DatePicker control from memory
| |
Repaint a Control
| |
Save data
for Control DatePicker
| |
Save a DatePicker control as BitMap file.
|
Remarks :
This control always return Value as Harbour/Clipper DATE value type
If SHOWNONE clause is used and shownone checkbox is unchecked - DATEPICKER return an empty 'date'
If no value is set this control Value is filled by current system date value
*) Characters available to format date display as DATEFORMAT clause or FormatString property
Element Description
"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.
|
"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.
|
"yy"
|
The last two digits of the year (that is, 2005 would be displayed as "05").
|
"yyyy"
|
The full year (that is, 2005 would be displayed as "2005").
|
To make the information more readable, you can add body text to the format string by enclosing it in single quotes. Spaces and punctuation marks do not need to be quoted.
Note: Nonformat characters that are not delimited by single quotes will result in
unpredictable display by the DTP control.
For example, to display the current date with the format "'Today is: Tuesday FEB 10,
2005",
the format string is "'Today is: 'dddd MMM dd', 'yyyy".
To include a single quote in your body text, use two consecutive single quotes.
For example, "'Don''t forget' MMM dd',' yyyy" format string produces output that
looks
like: Don't forget Mar 23, 2005.
It is not necessary to use quotes with the comma, so "'Don''t forget' MMM dd, yyyy"
is
also valid, and produces the same output.
EXAMPLE: