This is a strange behavior that I could not isolate in order to accurately reproduce it; however, it seems to happen quite often after using a little "x" before resetting the input. After the reset date, enter the actual date using the keyboard, and then go to the various month / day / year settings.
<input id="pi-start" type="date" data-clear-btn="false" value=""> $('#pi-start').on('input', function() { var value = $('#pi-start').val(); if ( value != '' ) { console.log(value); } else { console.log("Blank"); } });

You can see on the console where the month change triggered an input event, but the value for input has not been set.
What is going on here and what is the best way to prevent this? I want to be able to detect a change in value.
Chrome: version 64.0.3282.119 (official build) (64-bit)
jquery input html5 events datepicker
Olmstov
source share