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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy