- Home
- Forum
- Angular - EJ 2
- Time picker not opening after setCulture('zh-Hant') in ejs-datetimepicker
Time picker not opening after setCulture('zh-Hant') in ejs-datetimepicker
Dear Syncfusion Support Team,
I am using ejs-datetimepicker in my project and encountered the following issue when setting the culture to Traditional Chinese:
After applying the 'zh-Hant' culture, the time part of the datetimepicker becomes completely unresponsive: clicking the time portion (hours, minutes, AM/PM) does not open the time selection popup anymore.
https://stackblitz.com/edit/angular-zrizqviq?file=src%2Fapp.component.ts
Syncfusion Angular DateTimePicker Globalization
npm install cldr-data --save |
ca-gregorian.json, numbers.json, timeZoneNames.json, and supplemental files like numberingSystems.json and weekdata.json) before setting the culture.Currently using: @syncfusion/ej2-cldr-data. If I don't want to directly reference cldr-data, but still keep using ej2-cldr-data, is it possible to resolve the issue with the date-time controls in Traditional Chinese?
import * as numberingSystems from '@syncfusion/ej2-cldr-data/supplemental/numberingSystems.json';
import * as zhHansGregorian from '@syncfusion/ej2-cldr-data/main/zh-Hans/ca-gregorian.json';
import * as zhHansNumbers from '@syncfusion/ej2-cldr-data/main/zh-Hans/numbers.json';
import * as zhHansTimeZoneNames from '@syncfusion/ej2-cldr-data/main/zh-Hans/timeZoneNames.json';
import * as zhHantGregorian from '@syncfusion/ej2-cldr-data/main/zh-Hant/ca-gregorian.json';
import * as zhHantNumbers from '@syncfusion/ej2-cldr-data/main/zh-Hant/numbers.json';
import * as zhHantTimeZoneNames from '@syncfusion/ej2-cldr-data/main/zh-Hant/timeZoneNames.json';
import * as jaGregorian from '@syncfusion/ej2-cldr-data/main/ja/ca-gregorian.json';
import * as jaNumbers from '@syncfusion/ej2-cldr-data/main/ja/numbers.json';
import * as jaTimeZoneNames from '@syncfusion/ej2-cldr-data/main/ja/timeZoneNames.json';
Yes, it is possible to resolve issues with date-time controls in Traditional Chinese by using only the @syncfusion/ej2-cldr-data package without directly referencing the cldr-data package. The @syncfusion/ej2-cldr-data package contains the necessary CLDR JSON data for various cultures, including Traditional Chinese.
To implement Traditional Chinese localization with your DateTimePicker control, you can follow these steps:
First, import the required CLDR data from the @syncfusion/ej2-cldr-data package:
import { loadCldr, L10n } from '@syncfusion/ej2-base';
import zhHantNumbersData from "@syncfusion/ej2-cldr-data/main/zh-Hant/numbers.json";
import zhHantCalendarData from "@syncfusion/ej2-cldr-data/main/zh-Hant/ca-gregorian.json";
import zhHantTimeZoneData from "@syncfusion/ej2-cldr-data/main/zh-Hant/timeZoneNames.json";
import supplementalData from "@syncfusion/ej2-cldr-data/supplemental/numberingSystems.json";
import weekData from "@syncfusion/ej2-cldr-data/supplemental/weekdata.json"; // For correct first day of week
Load the CLDR data using the loadCldr method:
loadCldr(
zhHantNumbersData,
zhHantCalendarData,
zhHantTimeZoneData,
supplementalData,
weekData
);
Add the localized text using the L10n.load method:
L10n.load({
'zh-Hant': {
'datetimepicker': {
placeholder: '選擇日期和時間',
today: '今天'
}
}
});
Set the locale in your DateTimePicker:
let dateTimePicker = new DateTimePicker({
locale: 'zh-Hant'
});
dateTimePicker.appendTo('#element');
This approach allows you to use Traditional Chinese localization without directly referencing the cldr-data package, which is particularly useful for optimizing your bundle size since the @syncfusion/ej2-cldr-data package includes only the necessary CLDR data for Syncfusion components.
For specific date and time formats in Traditional Chinese, the DateTimePicker will automatically use the appropriate format based on the culture once the CLDR data is properly loaded.
Regards,
Priyanka K
Dear Syncfusion Support Team,
I am encountering a bug in the Essential JS 2 controls when using the Traditional Chinese (zh-Hant) culture.
Specifically, when I set the culture to "zh-Hant" using setCulture("zh-Hant"), the popup calendar (or list interface) for the DatePicker/DateTimePicker/TimePicker controls does not open. The input field is clickable, but no popup appears.
This issue occurs only with "zh-Hant". The other cultures I tested work fine:
"zh-Hans" (Simplified Chinese)
"en" (English)
"ja" (Japanese)
Here is the relevant code for loading the CLDR data and setting the culture:
JavaScriptimport * as numberingSystems from '@syncfusion/ej2-cldr-data/supplemental/numberingSystems.json';
import * as zhHansGregorian from '@syncfusion/ej2-cldr-data/main/zh-Hans/ca-gregorian.json';
import * as zhHansNumbers from '@syncfusion/ej2-cldr-data/main/zh-Hans/numbers.json';
import * as zhHansTimeZoneNames from '@syncfusion/ej2-cldr-data/main/zh-Hans/timeZoneNames.json';
import * as zhHantGregorian from '@syncfusion/ej2-cldr-data/main/zh-Hant/ca-gregorian.json';
import * as zhHantNumbers from '@syncfusion/ej2-cldr-data/main/zh-Hant/numbers.json';
import * as zhHantTimeZoneNames from '@syncfusion/ej2-cldr-data/main/zh-Hant/timeZoneNames.json';
import * as jaGregorian from '@syncfusion/ej2-cldr-data/main/ja/ca-gregorian.json';
import * as jaNumbers from '@syncfusion/ej2-cldr-data/main/ja/numbers.json';
import * as jaTimeZoneNames from '@syncfusion/ej2-cldr-data/main/ja/timeZoneNames.json';
import * as weekData from "@syncfusion/ej2-cldr-data/supplemental/weekData.json"; // Note: renamed to weekData for consistency
loadCldr(
numberingSystems,
zhHansGregorian,
zhHansNumbers,
zhHansTimeZoneNames,
zhHantGregorian,
zhHantNumbers,
zhHantTimeZoneNames,
jaGregorian,
jaNumbers,
jaTimeZoneNames,
weekData
);
// Testing different cultures
setCulture("zh-Hant"); // Popup does not open
setCulture("zh-Hans"); // Works fine
setCulture("en"); // Works fine
setCulture("ja"); // Works fine
I have also loaded the localized texts if required (using L10n.load for the corresponding cultures), but the issue persists specifically for zh-Hant.
Could you please investigate this issue and let me know if this is a known bug, or if there is any missing CLDR data or additional configuration needed for Traditional Chinese support?
Thank you for your assistance.
zh-Hant (Traditional Chinese) culture ./node_modules/cldr-data
setCulture. This includes the respective culture-specific files such as:ca-gregorian.jsonnumbers.jsontimeZoneNames.json
numberingSystems.jsonweekData.json
zh-Hant) culture. The sample uses only the cldr-data package, without directly referencing the cldr-data package. Please note that the cldr-data package already contains the required CLDR JSON data for multiple cultures, including Traditional Chinese, and works as expected when all the necessary files are loaded correctly.Gif :
- A sample or a modified version of the attached sample that reproduces the reported scenario.
- A video illustrating the issue and the exact steps followed.
- The Syncfusion version being used, and whether the issue is specific to a particular version.
Attachment: syncfusionangularapp_7d7e7ac9.zip
- 5 Replies
- 3 Participants
-
TE techlandandyzhang
- Dec 22, 2025 03:48 AM UTC
- Dec 30, 2025 03:57 AM UTC