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

Commit

Permalink
Reverted the code changes related to selecting the current month to r…
Browse files Browse the repository at this point in the history
…etrieve the current date.
  • Loading branch information
KV106606Viswanath committed Feb 8, 2024
1 parent 7e38e4a commit 8c2e721
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/terra-date-input/src/DateInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,6 @@ class DateInput extends React.Component {
const inputValue = event.target.value;
const stateValue = this.state.month;
const maxValue = 12;
const currentMonth = moment().format('MM');

if (inputValue === currentMonth) {
const date = moment().format('YYYY-MM-DD');
this.setState({ year: moment().year(), month: moment().format('MMMM'), day: moment().date() });
this.handleOnChange(event, date);
return;
}

// Ignore the entry if the value did not change or it is invalid.
if (inputValue === stateValue || Number(inputValue) > maxValue) {
Expand Down

0 comments on commit 8c2e721

Please sign in to comment.