Skip to content
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions packages/react-core/src/components/TimePicker/TimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export class TimePicker extends React.Component<TimePickerProps, TimePickerState
) {
time = `${time}${new Date().getHours() > 11 ? pmSuffix : amSuffix}`;
}
let scrollIndex = this.getOptions().findIndex(option => option.innerText === time);
let scrollIndex = this.getOptions().findIndex(option => option.textContent === time);

// if we found an exact match, scroll to match and return index of match for focus
if (scrollIndex !== -1) {
Expand All @@ -299,7 +299,7 @@ export class TimePicker extends React.Component<TimePickerProps, TimePickerState
}
}
time = `${splitTime[0]}${delimiter}00${amPm}`;
scrollIndex = this.getOptions().findIndex(option => option.innerText === time);
scrollIndex = this.getOptions().findIndex(option => option.textContent === time);
if (scrollIndex !== -1) {
this.scrollToIndex(scrollIndex);
}
Expand Down