input-moment icon indicating copy to clipboard operation
input-moment copied to clipboard

Doesn't select previously chosen date on load

Open stocks09 opened this issue 6 years ago • 0 comments

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.

stocks09 avatar Dec 24 '17 20:12 stocks09