Topic: Input type=date bug in mdb.js (iOS date picker not showing up)
Sorry, I accidentally deleted the original question
Expected behavior iOS Date Picker keyboard should show up.
Actual behavior iOS text keyboard show up.
Resources (screenshots, code snippets etc.)
<div class="md-form">
<label for="dob">Date Of Birth</label>
<input type="date" class="form-control" id="dob" value="2020-01-01" required>
<div class="invalid-feedback">
Date Of Birth is Required
</div>
</div>
This is causing the issue in mdb.js
{
key: "ChangeDateInputType",
value: function () {
var e = t('input[type="date"]');
e.each((function (t, e) {
e.type = "text"
})), e.on("focus", (function (t) {
t.target.type = "date"
})), e.on("blur", (function (e) {
e.target.type = "text", 0 === e.target.value.length && t("label[for=".concat(e.target.id, "]")).removeClass("active")
}))
}
}
jmgregory answered 5 years ago
I ran into this same issue, and I think it was because we had more than one script tag with mdbootstrap.js in our HTML. After I removed the duplicate script includes, the problem seems to have gone away. Perhaps extra event handlers were being added to the date input and causing a race condition with each other.
Grzegorz Bujański staff commented 5 years ago
Hi. I think the problem is somewhere else. We will deal with this soon.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.13.0
- Device: iOS (phone / ipad / etc)
- Browser: Embedded UIWebView
- OS: iOS (current)
- Provided sample code: No
- Provided link: No
Grzegorz Bujański staff commented 5 years ago
Hi. Thanks for reporting this. I will add this to our to-do list.