1

I have a web form that has lots of input controls. Most of them are numbers, not integers but decimals. Now my problem is, when a decimal has a comma separator (eg. 120,44) that input type remains empty (but when I check with the element inspector I see that the value attribute of that control has the value 120,44, it seems like is just not being displayed). Then I type the value manually inside the input and then I check with document.getElementById("#myelemet").val and the value is right.

So what else could i try here to have my decimal numbers displayed (without the comma separator they are displayed properly)

I have already tried to set the setting inside of web.config

    <globalization fileEncoding="utf-8" 
                requestEncoding="utf-8" 
                responseEncoding="utf-8" 
                culture="de-DE" uiCulture="de-DE" />

but it didnt help. Then I tried also to set the lang attribute for the input lang="de-DE" also didnt help ...

rimes
  • 761
  • 1
  • 8
  • 25
  • Is this a duplicate? http://stackoverflow.com/questions/36454320/comma-decimal-separator-is-ignored-by-asp-net-mvc-model-binder/36457406#36457406 – Fran Jul 27 '16 at 02:15
  • I dont think so. What you posted is for posting values to the server, my problem is displaying them on the client – rimes Jul 27 '16 at 02:50
  • this has been asked - input.number spec only supports period decimals http://stackoverflow.com/questions/13412204/localization-of-input-type-number – Steve Jul 27 '16 at 04:11

0 Answers0