getTextAsLongDate(): Date;
The getTextAsLongDate method returns the text in long date format from the text property of a TextBox control converted to a
If the text box is empty, null is returned. If the text is not a valid long date, an exception is raised. Use the isValid method to prevent incomplete long date data from generating an exception.
By default, a TextBox control expects dates to be formatted according to the current locale. This applies when accessing the text property and when the user enters data.
When the
Setting date text by using the setTextFromLongDate method converts the long date into the appropriate string for that locale. Retrieving the long date value by using the getTextAsLongDate method does the reverse. You can therefore use the getTextAsLongDate and setTextFromLongDate methods to access long date text so that JADE handles the locale format for you.