Code Monkey home page Code Monkey logo

Comments (2)

airblade avatar airblade commented on August 16, 2024

Done for the calendar component in f9d0446.

Should min and max also be handled when the user types in the text input? If yes, I think it would be via HTML custom constraint validation which the user has to opt in to.

I can see how to set an error message with setCustomValidity(). But I can't see how to update the ValidityState with the rangeUnderflow/rangeOverflow, which seems like it would be appropriate – maybe that can't be done for normal text inputs (as opposed to custom elements).

https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#constraints

Having read the spec, it looks like all you can / need to do with normal text inputs is setCustomValidity() with an error message or empty string.

from stimulus-datepicker.

airblade avatar airblade commented on August 16, 2024

Opt-in client-side validation is implemented in 9d33bf4.

from stimulus-datepicker.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.