Skip to content

HTML5 date broken with validator #455

Closed
@hazzik

Description

@hazzik

I want to use min and max attributes to restrict range with builtin HTML5 datepicker, but jquery-validation tries to validate the input and shows the error 'Please enter a value greater than or equal to NaN.'. I believe that this behavior is incorrect. From my point of view validator should not display message if date time is in valid range or should display actual restriction. HTML date input uses sortable date format yyyy-mm-dd so quick fix may be not try to interpret min and max attributes as numbers.

<form method="post">
    <div>
        <input type="date" min="2012-07-01" max="2012-07-31" value="2012-07-07"/>
    </div>
    <div>
        <input type="submit"/>
    </div>
</form>​

fiddle test: http://jsfiddle.net/LcL7a/1/ tested in Chrome 20 and Opera 12.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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