如何使用 <dx-scheduler> 在 timeCellComponent 中以 24 小时格式显示时间

How to display the time in 24-hour format in timeCellComponent using <dx-scheduler>

我有这样的时间'2:00 PM',我想像'14:00'这样得到它。谁能帮帮我?

参考这个 post https://supportcenter.devexpress.com/ticket/details/t495138/dxscheduler-how-to-show-a-time-scale-in-the-24-hour-format# 这是 2 年前的事了,例如有一些解决方法

timeCellTemplate={e =>new Date(e.date).toLocaleString("en-GB", {hour: "2-digit", minute: "2-digit"})}

支持团队也在此处提供了一些使用本地化的示例

https://js.devexpress.com/Demos/WidgetsGallery/Demo/Localization/UsingIntl/Angular/Light/

希望这能回答您的问题