Input date not work when using iscroll 5

60 views
Skip to first unread message

Steven Li

unread,
Mar 9, 2015, 6:03:22 AM3/9/15
to isc...@googlegroups.com
I have a input date "<input type="date" />", but it doesn't work when using iscroll 5. 
Others such as text/select are work fine. I have searched many articles, but nothing found.

How can i fix this issue?
Anybody who can help me!

Steven Li

unread,
Mar 9, 2015, 8:43:52 PM3/9/15
to isc...@googlegroups.com
I have configured "click:true,tap:true", in fact, the tap event is triggered.

Steven Li

unread,
Mar 10, 2015, 6:00:30 AM3/10/15
to isc...@googlegroups.com
I have fixed this issue to add a special input type check:
me.click = function (e) {
var target = e.target,
ev;
var isSpecialInputType = (/INPUT/i).test(target.tagName) && (/DATE|COLOR/i).test(target.getAttribute('type'));
if ( isSpecialInputType || !(/(SELECT|INPUT|TEXTAREA)/i).test(target.tagName)) {
ev = document.createEvent('MouseEvents');
ev.initMouseEvent('click', true, true, e.view, 1,
target.screenX, target.screenY, target.clientX, target.clientY,
e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
0, null);

ev._constructed = true;
target.dispatchEvent(ev);
}
};
Reply all
Reply to author
Forward
0 new messages