Skip to content

Commit ae78ad7

Browse files
fix(carbon): fix time picker minute range
1 parent f18bb2b commit ae78ad7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/carbon-component-mapper/src/tests/time-picker.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ describe('TimePicker', () => {
130130
});
131131
wrapper.update();
132132

133-
expect(wrapper.find('input').props().value).toEqual('13:28');
133+
expect(wrapper.find('input').props().value).toEqual('13:27');
134134
expect(onSubmit.mock.calls[0][0]['time-picker'].getHours()).toEqual(13);
135-
expect(onSubmit.mock.calls[0][0]['time-picker'].getMinutes()).toEqual(28);
135+
expect(onSubmit.mock.calls[0][0]['time-picker'].getMinutes()).toEqual(27);
136136
onSubmit.mockReset();
137137

138138
await act(async () => {

packages/carbon-component-mapper/src/time-picker-date/time-picker-date.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const TimePickerDate = (props) => {
4747
hours = hours % 24;
4848
}
4949

50-
minutes = minutes % 59;
50+
minutes = minutes % 60;
5151
const enhancedValue = new Date(`Jan 1 2000 ${hours}:${minutes}:00 ${timezone}`);
5252

5353
input.onChange(enhancedValue);

0 commit comments

Comments
 (0)