Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onKeyDown: event => {
// parse input when user presses enter on regular input,
// close menu and notify parent
if (event.key === 'Enter' && highlightedIndex === null) {
preventDownshiftDefault(event);
const parsedDate = parseInputText(
inputValue,
this.props.intl.locale,
this.props.timeZone
);
this.emit(parsedDate);
closeMenu();
}
},
onFocus: this.props.isReadOnly ? undefined : openMenu,