2

As far as i see, there is no way to replace the decimal separator that the browser displays for non-integers(if you want them to always be a period or always a comma, regardless of the localization). These are the actions that the browser performs under the hood taking into account the browser language and localization. Details can be found here.

Localization of input type number

https://www.ctrl.blog/entry/html5-input-number-localization.html

Therefore, I had a need to at least consider what is currently displaying an input, period or comma, and depending on this, change the contents of the label. So, basically what i need is function or something else, that will tell me what decimal separator is displaying now.

return comma if it's comma enter image description here

return period if it's periodenter image description here

  • I think it is impossible to know if the symbol is meant to be a decimal- or thousands-separator, e.g. if `"1,234"` means `1234` or `1.234`. – kca Jan 01 '22 at 12:45
  • Why "1.234" means 1234? It's not. The problem is whenever you'll try to find the value in this input(native events, etc. ...) you'll see the value with dot (1.34) and it's always be a dot. Maybe there is other way to check this. –  Jan 02 '22 at 09:09

0 Answers0