setTextFromShortDate

setTextFromShortDate(date: Date);

The setTextFromShortDate method of a TextBox control sets the text property value to a Date value converted to a String in the short date format of the current locale. Note that an exception is raised if the resulting string exceeds the maxLength property value of the text box.

When the EnhancedLocaleSupport parameter is not defined or it is set to false, inconsistent results could be returned to the application server when running in JADE thin client mode and there are regional overrides, as all overrides on the application server are suppressed. By default, formatting of locale data is done on the application server, based on the locale of the corresponding presentation client.

Retrieving the long date value by using the getTextAsShortDate method returns the text in long date format for the current locale. Setting date text by using the setTextFromShortDate method does the reverse.

You can therefore use the getTextAsShortDate and setTextFromShortDate methods to access long date text so that JADE handles the locale format for you.