title: How to use comma as decimal separator in Material UI's TextField type=number component?
body: <p>I'm building a <code>React</code> app using <code>Material UI</code> and having trouble with a <code>&lt;TextField type=&quot;number&quot;&gt;</code> input component.
  The field is used to add a weight in kilograms and I would like to be able to add numbers with decimals, like <code>3,4</code> for example. I can do that when typing manually, but the component only accepts a period <code>.</code> as the decimal separator (which is standard in the US for example). But because it's a Swedish site, I would like to accept a <code>,</code> (comma) as separator, or both period and comma.</p>
  <p>There seems to be the option to fix it using another library <code>react-number-format</code>.
  <strong>Is there any way to fix it without using another library?</strong></p>
  <p>I tried to change the <code>locale</code> in the Material UI <code>theme</code> but that didn't make any difference. I also changed my browser's language because some articles out there suggest that it can cause the problem, but it doesn't make a difference either. (It wouldn't be a real solution anyway, I think).
  I also tried to use <code>&lt;TextField inputProps={{ inputmode: 'numeric' pattern: '[0-9]*' }}&gt;</code> instead of <code>&lt;TextField type=&quot;number&quot;&gt;</code> as suggested here: <a href="https://github.com/mui-org/material-ui/issues/10582" rel="nofollow noreferrer">https://github.com/mui-org/material-ui/issues/10582</a>
  But it made things worse, in Firefox I was even able to add letters to the input field when using it.</p>