Grow your CSS skills. Land your dream job.

Disable script if device has input type=”date” support?

  • # June 22, 2012 at 4:03 pm

    Hi all,

    Does anyone know of a way that I can effectively disable or unload a script if input type=”date” is supported?

    I’m doing a design right now that I’m using datepicker.js for a dropdown to select a start and finish date for staying at a country house.

    However, I would like to use the built in date picker that comes on iOS and other browsers.

    Is there a way to disable the javascript that creates the drop down gallery if the device supports input type=”date” natively?

    Linky here: Contact Page

    # June 22, 2012 at 9:44 pm

    Instead of disabling a script, why not use Yepnope.js to load the script if needed.

    # June 23, 2012 at 4:17 pm

    Thanks @mottie, hadn’t thought of going the other way around! Just googled it and found this on here if anyone else is looking to do something similar.

    Progressively Enhancing HTML5 Forms

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".