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

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

Loading…
Cancel
Save