diff --git a/packages/terra-date-picker/src/DatePicker.jsx b/packages/terra-date-picker/src/DatePicker.jsx index c63488db02..6105e58ab7 100644 --- a/packages/terra-date-picker/src/DatePicker.jsx +++ b/packages/terra-date-picker/src/DatePicker.jsx @@ -17,11 +17,6 @@ const propTypes = { * String that labels the current element. 'aria-label' must be present for accessibility. */ ariaLabel: PropTypes.string, - /** - * @private - * Whether or not to disable focus on the calendar button when the calendar picker dismisses. - */ - disableButtonFocusOnClose: PropTypes.bool, /** * Whether the date input should be disabled. */ @@ -150,7 +145,6 @@ const propTypes = { }; const defaultProps = { - disableButtonFocusOnClose: false, disabled: false, excludeDates: undefined, filterDate: undefined, @@ -266,7 +260,8 @@ class DatePicker extends React.Component { this.props.onSelect(event, selectedDate.format(DateUtil.ISO_EXTENDED_DATE_FORMAT)); } - if (!this.props.disableButtonFocusOnClose && this.state.showPortalPicker) { + // If the portal picker is displayed, focus on the calendar button on selecting a date + if (this.state.showPortalPicker) { this.focusCalendarButton(); } } @@ -432,7 +427,6 @@ class DatePicker extends React.Component { render() { const { ariaLabel, - disableButtonFocusOnClose, excludeDates, filterDate, includeDates, diff --git a/packages/terra-date-picker/tests/jest/__snapshots__/CalendarFilter.test.jsx.snap b/packages/terra-date-picker/tests/jest/__snapshots__/CalendarFilter.test.jsx.snap index 68c8d26245..3205a973d5 100644 --- a/packages/terra-date-picker/tests/jest/__snapshots__/CalendarFilter.test.jsx.snap +++ b/packages/terra-date-picker/tests/jest/__snapshots__/CalendarFilter.test.jsx.snap @@ -3,7 +3,6 @@ exports[`should render a calendar filter with default date 1`] = `