简体   繁体   中英

Best way to remove default IOS date picker

I currently have the jQuery datepicker implemented which is working great on all browsers but when I view in mobile (iPad) the IOS default date picker comes up too. What is the best way to remove it? CSS? change input type?

This is what my input element looks like:

<input type="date" name="payment_Received" class="form-control datepicker" />
<script>
    j$(document).ready(function(e) {
        j$('.datepicker').datepicker({
            dateFormat:'yy-mm-dd'   
        });
    });
</script>

Just use type="text" instead of type="date"

You could also add readonly="readonly" to prevent the keyboard from appearing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM