openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Can't set locale value on the Time Picker

Open loatherer opened this issue 2 years ago • 5 comments

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

loatherer avatar Jan 19 '24 15:01 loatherer

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.

boghyon avatar Jan 20 '24 16:01 boghyon

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

loatherer avatar Jan 20 '24 17:01 loatherer

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 avatar Jan 23 '24 09:01 LidiyaGeorgieva

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

LidiyaGeorgieva avatar Jan 25 '24 14:01 LidiyaGeorgieva

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

SvBe avatar Jan 26 '24 08:01 SvBe