Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/datetime-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -561,12 +561,13 @@ const DateTimePicker = (
const onChangeMonth = useCallback(
(value: number) => {
const newDate = dayjs(stateRef.current.currentDate).add(value, 'month');
onSelectMonth(newDate.month());
dispatch({
type: CalendarActionKind.CHANGE_CURRENT_DATE,
payload: dayjs(newDate),
});
},
[stateRef, dispatch]
[stateRef, dispatch, onSelectMonth]
);

const onChangeYear = useCallback(
Expand Down