javascript - How can I validate a field client-side using HTML5 that is read only? -


i have input field launches datepicker. make work on mobile device, i've made field read only. means can launch date picker on click (or tap) using jquery, , tap doesn't open keyboard on mobile device.

however - readonly attribute bypasses html5 validation mechanisms. can add either mimics html5 validation , feel, keep consistency, or forces html5 validation despite field being readonly?

edit: i'm looking validating field filled in (required) , preferably fits date format.

readonly fields cannot have required attribute, contain value.

look @ html5 standard drafts


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -

Why does a .NET 4.0 program produce a system.unauthorizedAccess error on a Windows Server 2012 machine with .NET 4.5 installed? -