Skip to content

Commit

Permalink
fix: Datepicker required functionality is incorrect. (#310)
Browse files Browse the repository at this point in the history
Co-authored-by: Himanshu Parwani <hparwani@Himanshus-MacBook-Pro.local>
  • Loading branch information
hparwani2 and Himanshu Parwani committed Sep 28, 2023
1 parent e0109cf commit d8f70bc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions coral-component-datepicker/src/scripts/Datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,9 @@ const Datepicker = Decorator(class extends BaseFormField(BaseComponent(HTMLEleme
set required(value) {
this._required = transform.booleanAttr(value);
this._reflectAttribute('required', this._required);

this._elements.toggle.classList.toggle('is-invalid', this._required);

this._elements.input.required = this._required;
// this._elements.toggle.classList.toggle('is-invalid', this._required);
// this._elements.input.required = this._required;
this._elements.input.setAttribute("aria-required", this._required);
}

/**
Expand Down

0 comments on commit d8f70bc

Please sign in to comment.