mirror of
https://github.com/quantum5/qcal.git
synced 2025-04-25 02:01:56 -04:00
Fix string/int type issue
This commit is contained in:
parent
2a1a18da13
commit
6f4751af2a
|
@ -164,11 +164,10 @@ export class Calendar extends React.Component<CalendarProps, CalendarState> {
|
|||
}
|
||||
|
||||
monthChange(event: any) {
|
||||
this.goToNormalized(this.props.year, event.target.value as Month);
|
||||
this.goToNormalized(this.props.year, +event.target.value as Month);
|
||||
}
|
||||
|
||||
yearChange(event: any) {
|
||||
console.log(/^-?\d+/.test(event.target.value));
|
||||
if (/^-?\d+/.test(event.target.value)) {
|
||||
this.goToNormalized(+event.target.value, this.props.month);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue