jquense / react-formal

Sophisticated HTML form management for React
http://jquense.github.io/react-formal
MIT License
526 stars 52 forks source link

DatePicker and textarea input #116

Open n0ne opened 7 years ago

n0ne commented 7 years ago

I have very strange behavior of these two input fields. Some pieces of my code:


     <Form
        schema      ={ modelSchema }
        value={ this.state.model }
        onChange={ model =>  { this.setState({ model: model }) } }                
        onSubmit={ this.handleSubmit }
     >

    ......
        <Form.Field
            name='from'
            type='date'
            min={ new Date() }
            max={ new Date(moment().add(21, 'days')) }
         />
        <Form.Field
            name='description'
            type='textarea'
        />
    ......

    </Form>

If at first I'm typing in textarea - everything OK But if I selected date at first and then start typing... it become too slow, painful

I did small video. Any suggestions?

jquense commented 7 years ago

i'm not sure not knowing what your inputs are but perhaps the reason is creating a new date on each render?