Reputation: 156
I try to input with some decimal but I got this prompt message from my min-max value.
and this is my Textfied element
<TextField
type="number"
InputProps={{ inputProps: { min: 36, max: 40 } }}
onFocus={() => handleOnFocus('bodyTemp')}
onChange={(e) => setBodyTemp(e.target.value)}
value={bodyTemp}
/>
Upvotes: 4
Views: 6816
Reputation: 2466
Add step
attribute.
<TextField
type="number"
step="any"
InputProps={{ inputProps: { min: 36, max: 40 } }}
onFocus={() => handleOnFocus('bodyTemp')}
onChange={(e) => setBodyTemp(e.target.value)}
value={bodyTemp}
/>
Upvotes: 0