JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" name="numeric" class='allow_decimal'> // like 090903942348.44

JavaScript

$('.allow_decimal').keyup(function(evt){   
  
   var self = $(this);
   self.val(self.val().replace(/[^0-9\.]/g, ''));
   if ((evt.which != 46 || self.val().indexOf('.') != -1) && (evt.which < 48 || evt.which > 57)) 
   {
     evt.preventDefault();
   }
  

});