Претражи подршку

Избегните преваре подршке. Никада од вас нећемо тражити да зовете или шаљете поруке на број или да делите личне податке. Пријавите сумњиве радње преко „Пријавите злоупотребу” опције.

Сазнај више

decimal symbol is a comma for input type=number but OS is set to a point

  • 1 одговор
  • 8 има овај проблем
  • 255 прегледа
  • Последњи одговор послао AndrewG2

more options

I have a form with an input <input id="quantity" name="quantity" step="0.01" type="number"> but when I type something like 5.5 it tells me that is not valid. The regional setting in Windows 10 are set to use a point as the decimal symbol, but Firefox will only accept it as a number if I use a comma e.g. 5,5

It also did this on Windows 7. Other browsers do accept the point symbol.

I have a form with an input <input id="quantity" name="quantity" step="0.01" type="number"> but when I type something like 5.5 it tells me that is not valid. The regional setting in Windows 10 are set to use a point as the decimal symbol, but Firefox will only accept it as a number if I use a comma e.g. 5,5 It also did this on Windows 7. Other browsers do accept the point symbol.

Изабрано решење

I have figured out what was causing it. I had declared the language in html as en-ZA. Changing it to en fixed the problem i.e. <html lang="en">

Прочитајте овај одговор са објашњењем 👍 1

Сви одговори (1)

more options

Одабрано решење

I have figured out what was causing it. I had declared the language in html as en-ZA. Changing it to en fixed the problem i.e. <html lang="en">

Измењено од стране AndrewG2