Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.state.attributes.startDate = ''
- this.state.attributes.endDate = ''
- <Select
- className='form-control'
- name='endDate'
- value={attributes.endDate}
- required={true}
- onChange={e => {
- this.updateAttribute(e, 'startDate')
- }}
- options={this.options}
- />
- updateAttribute = (e: ReactEvent, attribute: string) => {
- e.preventDefault && e.preventDefault()
- const attributes = {
- ...this.state.attributes,
- [attribute]: e.target ? e.target.value : e
- }
- this.setState({ attributes: attributes }, () => this.submitForm())
- }
Add Comment
Please, Sign In to add comment