Skip to content

Commit

Permalink
[DateTimePicker] Fix month view highlight wrong tab (#30773)
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoYungh authored Jan 26, 2022
1 parent 2046b2f commit 5cde5d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mui-lab/src/DateTimePicker/DateTimePickerTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type TabValue = 'date' | 'time';

const viewToTab = (openView: DateTimePickerView): TabValue => {
// TODO: what happens if `openView` is `month`?
if (openView === 'day' || openView === 'year') {
if (['day', 'month', 'year'].includes(openView)) {
return 'date';
}

Expand Down

0 comments on commit 5cde5d3

Please sign in to comment.