Dijit TextBox Globalization Test for Time

Press the following button to start all test after this page is loaded.

Before start this test, make sure the dojo/cldr/nls contains the data for "zh-cn", "fr-fr", "ja-jp", "ru-ru", "hi-in", "en-us" and "ar-eg". If not, convert these CLDR data and put them there.

Time Format

Test DescriptionTestExpectedResultComment
Locale: ru_RU Format: Short15:25 Compare (Escaped)
Locale: ru_RU Format: Medium
Locale: ru_RU Format: LongSee #1.
Locale: ru_RU Format: FullSee #1.
Locale: zh_CN Format: Short
Locale: zh_CN Format: Medium
Locale: zh_CN Format: Long
Locale: zh_CN Format: FullSee #1.
Locale: en_US Format: Short
Locale: en_US Format: Medium
Locale: en_US Format: LongSee #1.
Locale: en_US Format: FullSee #1.
Locale: fr_FR Format: Short
Locale: fr_FR Format: Medium
Locale: fr_FR Format: LongSee #1.
Locale: fr_FR Format: FullSee #1.
Locale: ja_JP Format: Short
Locale: ja_JP Format: Medium
Locale: ja_JP Format: LongSee #1.
Locale: ja_JP Format: FullSee #1.
Locale: ar_EG Format: Short
Locale: ar_EG Format: Medium
Locale: ar_EG Format: Long
Locale: ar_EG Format: FullSee #1.
Locale: hi_IN Format: ShortSee #2.
Locale: hi_IN Format: MediumSee #2.
Locale: hi_IN Format: LongSee #1. See #2.
Locale: hi_IN Format: FullSee #1. See #2.

Time Validate

Test DescriptionTestInputParsed ValueExpectedResultComment
Locale: ru_RU Format: ShortCorrect
Locale: ru_RU Format: MediumCorrect
Locale: ru_RU Format: LongCorrectSee #1.
Locale: ru_RU Format: FullCorrectSee #1.
Locale: zh_CN Format: ShortCorrectSee #3.
Locale: zh_CN Format: MediumCorrectSee #3.
Locale: zh_CN Format: LongCorrectSee #3.
Locale: zh_CN Format: FullCorrectSee #1.
Locale: en_US Format: ShortCorrect
Locale: en_US Format: MediumCorrect
Locale: en_US Format: LongCorrectSee #1.
Locale: en_US Format: FullCorrectSee #1.
Locale: fr_FR Format: ShortCorrect
Locale: fr_FR Format: MediumCorrect
Locale: fr_FR Format: LongCorrectSee #1.
Locale: fr_FR Format: FullCorrectSee #1.
Locale: ja_JP Format: ShortCorrect
Locale: ja_JP Format: MediumCorrect
Locale: ja_JP Format: LongCorrectSee #1.
Locale: ja_JP Format: FullCorrectSee #1.
Locale: ar_EG Format: ShortCorrect
Locale: ar_EG Format: MediumCorrect
Locale: ar_EG Format: LongCorrect
Locale: ar_EG Format: FullCorrectSee #1.
Locale: hi_IN Format: ShortCorrectSee #2.
Locale: hi_IN Format: MediumCorrectSee #2.
Locale: hi_IN Format: LongCorrectSee #1. See #2.
Locale: hi_IN Format: FullCorrectSee #1. See #2.

Issues & Comments

Issue #1 Fixed

Currently Dojo do not support parsing for most "long" and "full" time format which have a timezone mark in it.

Issue #2 Fixed: added a "localeDigit" to the options

Strictly speaking, the data conversion must support non-European number characters in some locales like Arabic and Hindi. For example, ICU formats a number data into Indic number characters by default in the Arabic locale. However, currently Dojo does not support this feature (Dojo uses the default number conversion of the browser).

Issue #3 Fixed

This defect only occurs on the "zh-cn" locale. Dojo accepts "下午"(pm) in the textbox, but it automatically changes it to "上午"(am) after the focus changed. The date value of the textbox is also changed.

The root cause of this issue is that the parser method's code assumes am/pm symbol always appears after the hour value. But this is not true, for example, the pattern for "zh-cn" puts am/pm field before all the other fields.

56 tests to run in 1 groups
------------------------------------------------------------
GROUP "t" has 56 tests to run