Date and Time Picker attributes
backgroundColor (String)
The backgroundColor attribute is the name of the RGB color for the background of the part.
borderWidth (Integer)
The borderWidth attribute is the width of the border, specified in pixels, that surrounds the part on all four sides. A width of zero means that a border does not show.
On some platforms, the border width is limited to 1 pixel and any nonzero value is set to 1.
date (aDate)
The date attribute is the day month and year associated with the part.
day (Integer)
The day attribute is the calendar day associated with the part.
displayFormat (String)
The displayFormat attribute is a format string associated with the part. Possible values are:
•XmSHORT ('M/yyyy')
•XmMEDIUM (Windows LOCALE_SSHORTDATE)
•XmLONG (Windows LOCALE_SLONGDATEFORMAT)
•XmTIME (Windows LOCALE_STIMEFORMAT)
dragDropSpec (AbtDragDropSpec)
dropdown (Boolean)
The dropdown attribute controls whether the part displays a dropdown arrow or an up-down control to modify the part’s value.
enabled (Boolean)
The enabled attribute specifies whether or not the part is available for selection. If true, the part's contents are available for selection.
foregroundColor (String)
The foregroundColor attribute is the name of the RGB color for the foreground of the part.
framingSpec (AbtViewAttachmentConstraint)
The framingSpec attribute represents the values specified for the edge specifications of the part. The edge specifications determine the width, height, and position of the part.
helpFile (String)
The helpFile attribute is the name of the help file associated with the part.
helpKeysId (String)
The helpKeysId attribute is the ID of the keys help associated with the part. The ID can be a string or an integer value.
The ID must exist in the help file associated with the part.
helpTitle (String)
The helpTitle attribute is the title of the help window associated with the part.
helpTopicId (String)
The helpTopicId attribute is the ID of the help topic associated with the part. The ID can be a string or an integer value.
The ID must exist in the help file associated with the part.
hour (Integer)
The hour attribute is the clock hour associated with the part.
mappedWhenManaged (Boolean)
The mappedWhenManaged attribute specifies whether the part should be shown. If the part is currently shown, setting this attribute to false will hide the part. If the part is currently hidden, setting this attribute to true will show the part, if the parent part is shown.
minute (Integer)
The minute attribute is the clock minute associated with the part.
month (Integer)
The month attribute is the calendar month associated with the part.
object (aDateAndTime)
the object attribute is the date and time associated with the part.
second (Integer)
The second attribute is the clock second associated with the part.
self (<className>)
shownone (Boolean)
The shownone attribute controls whether the part displays a check box that is automatically selected whenever a date is picked or entered. If the check box is subsequently deselected, the application cannot retrieve the date from the control because, in essence, the control has no date.
tabGroup (Boolean)
The tabGroup attribute specifies whether or not the part is included as a tab stop so users can use the Tab and Backtab keys to access the part.
traversalOn (Boolean)
The traversalOn attribute specifies whether users can access the part using the cursor movement keys. If the part is specified as a tab stop by using the tabGroup attribute, users also can use the Tab and Backtab keys to access the part.
year (Integer)
The year attribute is the calendar year associated with the part.
Date and Time Format Strings
A format string consists of a series of elements each of which defines how to display a particular piece of the date and time value. The format elements are displayed in the order they appear in the format string and are replaced by the actual date and time. The following groups of characters specifies how to display the various pieces of a date and time value.
| |
"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"). |
In addition to elements which are replaced by the value of a time and date picker, text can be shown in the control. This is done by adding text to the format string within 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 control.
Example 1: To display a date with the format "'Today is: 04:22:31 Tuesday Mar 23, 1996", the format string is "'Today is: 'hh':'m':'s dddd MMM dd', 'yyyy".
Example 2: "'Don''t forget' MMM dd',' yyyy" produces output that looks like: Do not forget Mar 23, 1996. 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.