Junior Developer
Junior Developer

Reputation: 11

HTML How to make the datepicker visible on Internet Explorer 11?

The tag is shown as of type text on Internet Explorer 11 while it is showing properly on Chrome. The calendar pop-up is not being shown.

Chrome did not experience such issue.

    <div id="user_data">
        <form method="POST" enctype="multipart/form-data">
            <p>
                <label>Enter File Name:</label>
                <input type="text" name="dirname" value="Enter File Name here">
            </p>
            <p>
                <label>Expiry Date:</label>
                <input type="date" name="expDate">
            <p>

            <p>
                <input class ="f" type="file" name="file">
            </p>

            <p>
                <input id="doneBtn" type="submit" value="Upload">
            </p>
        </form> 

    </div>

Upvotes: 1

Views: 3218

Answers (1)

Morgan Kelsie McGuire
Morgan Kelsie McGuire

Reputation: 396

These form fields were never implemented in Internet Explorer and therefore degrade to a default text field. See for support details: https://caniuse.com/#feat=input-datetime

You would need to use a javascript polyfill/replacement to display a datepicker in IE11. e.g. https://github.com/brianblakely/nodep-date-input-polyfill

Upvotes: 3

Related Questions