Fix the type of the DateTimePicker's change callback.

master
Tom Hacohen 7 years ago
parent 5dd2ff232f
commit 56a28bf9c8

@ -218,7 +218,7 @@ class EventEdit extends React.PureComponent {
<DateTimePicker <DateTimePicker
dateOnly={this.state.allDay} dateOnly={this.state.allDay}
value={this.state.start} value={this.state.start}
onChange={(date: Date) => this.setState({start: date})} onChange={(date: string) => this.setState({start: date})}
/> />
</div> </div>
@ -226,7 +226,7 @@ class EventEdit extends React.PureComponent {
<DateTimePicker <DateTimePicker
dateOnly={this.state.allDay} dateOnly={this.state.allDay}
value={this.state.end} value={this.state.end}
onChange={(date: Date) => this.setState({end: date})} onChange={(date: string) => this.setState({end: date})}
/> />
</div> </div>

@ -9,7 +9,7 @@ class DateTimePicker extends React.PureComponent {
props: { props: {
value?: string, value?: string,
dateOnly?: boolean, dateOnly?: boolean,
onChange: (date: Date) => void; onChange: (date: string) => void;
}; };
constructor(props: any) { constructor(props: any) {

Loading…
Cancel
Save