Gets or sets the locale object used to format and display localizable information in the view.
Namespace: MindFusion.Common.UI
File: DateTimeView.js
Syntax
JavaScript
Copy Code
|
---|
get locale() {}
|
Property Value
Example
The following code creates a new Locale called "us-2" and assigns it to the locale property of a DateTimeView instance:
JavaScript
Copy Code
|
---|
var ui = MindFusion.Common.UI; var locale = new ui.Locale("us-2"); locale.dateSettings.dateFormats.shortDate = "MM/d/yyyy"; locale.dateSettings.dateFormats.shortTime = "h:mm tt"; locale.dateSettings.dateFormats.shortDateTime = "MM/d/yyyy h:mm tt"; locale.dateSettings.dateFormats.longDate = "dddd, MMMM dd, yyyy"; locale.dateSettings.dateFormats.longTime = "h:mm:ss tt"; locale.dateSettings.dateFormats.longDateTime = "dddd, MMMM dd, yyyy h:mm:ss tt"; locale.dateSettings.dateFormats.dayMonth = "d/MM"; locale.dateSettings.dateFormats.yearMonth = "MMMM, yyyy"; locale.dateSettings.generate(); dateTimeView.locale = locale; |
See Also