input-moment
input-moment copied to clipboard
Doesn't select previously chosen date on load
Hi, When my input-moment calendar loads saved data to show previously selected date, it always selects the current date and not what I saved before.
In my FormComponent:
<Field
name="starts"
value={eventStarts}
component={DateTimePicker}
withRef
/>
In my DateTimePicker:
render() {
return (
<InputMoment
moment={this.state.m}
onChange={this.handleChange}
minStep={5}
/>
);
NOTE: It properly saves data in the datastore so I know it works this part. The part that doesn't work is re-selecting the last chosen date.