Skip to content

Commit

Permalink
fix: is date validation and matching restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
harshith-venkatesh-freshworks committed Nov 12, 2024
1 parent 1a2b66f commit ccf0af2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1032,9 +1032,9 @@ export class Datepicker {
if (
year < this.minYear ||
year > this.maxYear ||
!isValid(parsedDate) ||
(this.langModule?.code !== 'is' && !isValid(val)) ||
(this.langModule?.code !== 'is' &&
!isMatch(parsedDate, this.displayFormat, {
!isMatch(val, this.displayFormat, {
locale: this.langModule,
})) ||
!this.isDateWithinMinMaxDate(parsedDate.valueOf(), false)
Expand Down

0 comments on commit ccf0af2

Please sign in to comment.