Mohamed Hadi
Mohamed Hadi

Reputation: 1

how to set "min" and "max" value for Field in redux-form

Input type being date and have something similar to this :

 <input type="date" id="start" name="trip-start"
       value="2018-07-22"
       min="2018-01-01" max="2018-12-31">

Upvotes: 0

Views: 490

Answers (1)

Geovani Santos
Geovani Santos

Reputation: 391

So man, that is it. Just close your tag:

<Field
   name="trip-start"
   component={<input
    type="date"
    value="2018-07-22"
    min="2018-01-01"
    max="2018-12-31"
   />}
/>

Upvotes: 1

Related Questions