Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[Date-Time-Picker] Month/Year changing redundant announcement fix #2057

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Changes from 1 commit
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
Next Next commit
DateTimePicker month/year redundand reading fix
ashishkumbhare116 committed Feb 29, 2024
commit 58e06c86f9fc382f1cc6325c7cf7bd2572399bb7
3 changes: 3 additions & 0 deletions packages/terra-date-picker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,9 @@

## Unreleased

* Changed
* Fix for month/year SR redundant reading in Jaws.

## 4.100.0 - (February 28, 2024)

* Changed
5 changes: 3 additions & 2 deletions packages/terra-date-picker/src/react-datepicker/calendar.jsx
Original file line number Diff line number Diff line change
@@ -288,6 +288,7 @@ export default class Calendar extends React.Component {
}

handleDropdownClick(event){
console.log("CHECKING THIS dropdown clicked")
if(event.keyCode === KeyCode.KEY_UP || event.keyCode === KeyCode.KEY_DOWN ) {
this.setState({ calendarIsKeyboardFocused : true});
}
@@ -465,15 +466,15 @@ export default class Calendar extends React.Component {
isMonthChanged: true,
date: getStartOfMonth(setYear(cloneDate(this.state.date), year))
})
this.props.setPreSelection(getStartOfMonth(setYear(cloneDate(this.state.date), year)),dateValues.YEAR,year);
//this.props.setPreSelection(getStartOfMonth(setYear(cloneDate(this.state.date), year)),dateValues.YEAR,year);
}

changeMonth = (month) => {
this.setState({
isMonthChanged: true,
date: getStartOfMonth(setMonth(cloneDate(this.state.date), month))
}, () => this.handleMonthChange(this.state.date))
this.props.setPreSelection(getStartOfMonth(setMonth(cloneDate(this.state.date), month)),dateValues.MONTH,month);
// this.props.setPreSelection(getStartOfMonth(setMonth(cloneDate(this.state.date), month)),dateValues.MONTH,month);
}

header = (date = this.state.date) => {