greaterThan() not normalizing input

Author: enboigCreated Oct 26, 2022Updated Jun 14, 2023
LabelsType: BugStatus: Verified

Your environment

  • Version of jquery-validate: v1.19.5
  • Browser name and version: Firefox

Current behavior

I need to compare 2 datetime fields. They are localized so I have writen a normalizer to transform them to "YYYY-MM-DD hh:mm" form (including leading zeros). When I compare them with greaterThan() it fails because second date is not normalized

Expected behavior

If input field has a normalizer, use it before comparing.

https://jsbin.com/goruriroto/edit?html,js,console,output

It may also affect greaterThanEqual, lessThan and lessThanEqual

Source: jquery-validation/jquery-validation