This input work correct, when i just add it to the index.html. But it doesnt work when generated by react. The nums in input form just dont changing. Why is this happening?
<input type="date" name="date" value="2003-12-16" max="2021-07-03"/>
To achieve your goal you have go with React way (Controlled Components):
<input type="date" value={this.state.value} onChange={this.handleChange} max="2021-07-03" />
Working demo: Codesandbox
To know about Uncontrolled Components please visit: Uncontrolled Components
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With