SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.94k stars 1.23k forks source link

Can't set locale value on the Time Picker #3951

Closed loatherer closed 7 months ago

loatherer commented 7 months ago

Hello, my intention is to set localized number to the Time Picker View however I can't set the converted values to the view. Is Time Picker supports locale numbers ? If not please suggest me a work around. I convert the time with moment locale moment locale then trying to set the value with setValue(). There is problem when the numbers are not in the Latin alphabet (0-9... ISO-8859-1).

OpenUI5 version: 1.108.14

Browser/version (+device/version): Google Chrome/ Version 120.0.6099.110

Any other tested browsers/devices(OK/FAIL):

URL : https://jsbin.com/bebubetohu/edit?html,js,console,output

Steps to reproduce the problem:

  1. Try to set locale Hindi,Arabic numbers to the Time picker
  2. Doesn't set the value

What is the expected result? Should set the value What happens instead? Doesn't set the value

image

boghyon commented 7 months ago

Please close this for now and use Stack Overflow to clarify whether it's a bug, a missing feature, or for questions in app development in general. Include there information on what you are actually trying to achieve and the target environment of the app. E.g. which backend technology is involved? Is the data service OData? Does the user need to see the time in Indo-Arabic numbers? Or is only the internal data in the Indo-Arabic format ("١١:١١:١١") while the UI can display 11:11:11? etc.. Additionally, there are many ways to "bind" values to the UI.

loatherer commented 7 months ago

Hello @boghyon I have updated the post, I use JEE on the backend. Moment library to format time. Yes the user needs to see numbers according to their configurated locale. This problem does occur when the number format is out of Latin alphabet.

Best, Mete

LidiyaGeorgieva commented 7 months ago

After consultation with the Time Picker colleagues we clarify that Time Picker uses Date Format, which does not support the feature. Here is one example with Hindi https://jsbin.com/novuzaqulu/1/edit?html,output

LidiyaGeorgieva commented 7 months ago

Hello @loatherer , Thank you for sharing your enhancement proposal. I've created an internal incident DINC0049693. The status of the issue will be updated here in GitHub. Regards, Lidiya

SvBe commented 7 months ago

Hello, SAPUI5 does not (yet) support digits different to 0123456789. So it is not possible to either display numbers in the Indo-Arabic format ("١١:١١:١١") nor to enter numbers in that way. Currently it is not planned to support other representations of digits due to missing capacity. Regards, Sven