A DateFormField object represents a date field on a form. It can be initially empty and it can have a horizontal extension, when it is empty. When a date field is clicked or entered through the keyboard's arrow keys a date control is shown where the user can select a date. When the date field is clicked again or the Escape key is pressed the date control is removed and the user can insert or change the date with the keyboard. The date is formatted depending on the culture used for the text of the date field. When a date field is inserted at a position without a set culture, a TextControl uses the system language to select a culture. Supported formats for a certain language can be obtained through the DateFormField.getSupportedDateFormats method and can be set with the DateFormField.setDateFormat method. When the DateFormat is an empty string, which is the default, the culture's default format is used. A user can also insert or change a date with the keyboard, then the TextControl tries to parse the inserted date depending on the specified format and culture and automatically formats the date. When parsing is not possible the previous date is restored.

Syntax

DateFormField

Introduced: X18.

Methods

Method Description
getBounds Gets the bounding rectangle of a text field.
(Inherited from FormField)
getContainsInputPosition Returns true, if the Textfield contains the current text input position.
(Inherited from FormField)
getDate Gets the DateFormField's date.
getDateFormat Gets the date's format.
getDeleteable Gets whether a text field can be deleted by the end-user while a TX Text Control document is being edited.
(Inherited from FormField)
getDoubledInputPosition Sets whether a text field has a doubled input position in front of its first character and behind its last character.
(Inherited from FormField)
getEditable Gets whether the text of a text field can be changed by the end-user while a TX Text Control document is being edited.
(Inherited from FormField)
getEmptyWidth Gets the horizontal extension, in twips, of the date formfield, when it is empty.
getEnabled Gets a value indicating whether the form field is enabled.
(Inherited from FormField)
getFormattingBounds Gets the formatting rectangle of a text field.
(Inherited from FormField)
getHighlightColor Gets the highlight color for the text field.
(Inherited from FormField)
getHighlightMode Gets a value indicating when the text field is highlighted.
(Inherited from FormField)
getID Gets an identifier for a text field.
(Inherited from FormField)
getIsSpellCheckingEnabled Gets whether a text field's text is checked on misspelled words.
(Inherited from FormField)
getLength Gets the number of characters in a text field.
(Inherited from FormField)
getName Relates a user-defined name to a text field.
(Inherited from FormField)
getStart Gets the first character position (one-based) of a text field.
(Inherited from FormField)
getSupportedDateFormats Gets an array of format picture strings which can be used to format the date.
getText Gets the text which is contained within a text field.
(Inherited from FormField)
scrollTo Sets the current input position to the beginning of a text field and scrolls it into the visible part of the document.
(Inherited from FormField)
setDate Sets the DateFormField's date.
setDateFormat Sets the date's format.
setDeleteable Sets whether a text field can be deleted by the end-user while a TX Text Control document is being edited.
(Inherited from FormField)
setDoubledInputPosition Gets whether a text field has a doubled input position in front of its first character and behind its last character.
(Inherited from FormField)
setEditable Sets whether the text of a text field can be changed by the end-user while a TX Text Control document is being edited.
(Inherited from FormField)
setEmptyWidth Sets the horizontal extension, in twips, of the date formfield, when it is empty.
setEnabled Sets a value indicating whether the form field is enabled.
(Inherited from FormField)
setHighlightColor Sets the highlight color for the text field.
(Inherited from FormField)
setHighlightMode Sets a value indicating when the text field is highlighted.
(Inherited from FormField)
setID Sets an identifier for the text field.
(Inherited from FormField)
setIsSpellCheckingEnabled Gets whether a text field's text is checked on misspelled words.
(Inherited from FormField)
setName Sets the name of a text field.
(Inherited from FormField)
setText Sets the text which is contained within a text field.
(Inherited from FormField)