Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Html5 native datepicker, on change

I have a itemlist in my mobile application with search field and date field. But i'm not possible to trigger my function when i change the date with HTML5's native datepicker on iOS.

I have tried jq change() function and on.('input') but its not seems to work.

like image 250
Rond Avatar asked Apr 25 '26 09:04

Rond


1 Answers

Problem solved

onBlur gets trigged on iOS (Safari, iCab)

Test 1

<script>
function test(test) {
    alert("trigged");
}
</script>
<input type="date" onblur="test()" />

Test 2

jQuery("input[name=date]").blur(function() { alert("hi"); });
like image 164
Rond Avatar answered Apr 26 '26 22:04

Rond



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!