简体   繁体   中英

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">

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"
   />}
/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM