0

I have a Jquery UI inline Datepicker widget with an id of '19', set with an altField of '#desc19'.

The HTML is a simple

<div class="datepicker" id="19"></div>
<input type="text" id="desc19">

This works fine. I click a date on the calendar, and the text field updates.

However, I've also got a script that tries to run whenever the date in the text field is updated.

$("#desc19").on("input", function(){
    alert("???");
});

And this does... Nothing. I click a date on the calendar, and the alert does not display. I change the field manually, and the alert does not display. I cannot for the life of me figure out why. Putting the alert outside of the function works fine, but of course that defeats the point.

Alice
  • 51
  • 7

1 Answers1

2

Use the .change() event instead, and see if that works. If not, use the datepicker and an .onblur for clicking off it (or hiding it by selecting a date)

TechnicalTophat
  • 1,655
  • 1
  • 15
  • 37