I currently am creating a date picker like so
HTML
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<input id="datepicker" type="datepicker" name="date" placeholder="Date" />
JS
$('#datepicker').datepicker()
.on("change", function (e) {
console.log("Date changed: ", e.target.value);
});
My goal is to be able to listen for when the user clears out the date box. However, the change event only seems to fire once you unfocus the date box. I'm wondering if there's a way to listen for all changes in a jQuery date box, or if there are any better alternatives.
JsFiddle link: https://jsfiddle.net/szkfm0y7/