Skip to content

greaterThan() not normalizing input #2450

Open
@enboig

Description

@enboig

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions