title: How to have only decimal values in the input - React
body: <p>I am doing a system that I need that the input be decimal, like this: <code>0.000</code>.</p>
  
  <p>But I can't use type <code>number</code> in the <code>input</code> because when I type any number, the <code>step</code> doesn't work.</p>
  
  <p>I already made a function using <code>parseFloat</code> but it doesn't work too.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const value = e.target.value;
  const valueParseMilion = parseFloat(value).toFixed(3);</code></pre>
  </div>
  </div>
  </p>
  
  <p>With that above, it increments the last numbers and doesn't work for me...</p>
  
  <p>What I want is:</p>
  
  <p>The input starts with <code>0.000</code>, when I type number 1 for example, it should be <code>1.000</code>.</p>
  
  <p>Or if I type <code>0.10</code> it should complete <code>0.100</code> </p>
  
  <p>And or if I type <code>10.000</code> it should be <code>10.000</code> as well.</p>
  
  <p>Can someone help me? It can be any function inside of onChange.</p>
  
  <p>Thanks.</p>