I have a datepicker field setup like this and it works fine:
value='<?php echo $perfdate;?>'
class='date date_toggled order_date'
I would like to raise an alert when the value is changed. I've added this:
but it doesn't work. Anyone know how to make it work please?
Not sure if this makes a difference, but you have the input marked readonly, so it should never change (which maybe why your alert isn't getting invoked)
Thanks. I removed that line and it makes no difference. Actually the fact that it's marked readonly doesn't mean it can't change, only that it can't be changed in the usual way of typing something into the box. It can still be changed by JS or php.
Even then, changing the value of an input box programmatically won't actually trigger the onchange event...I know, weird. Wherever you're changing the value in your script, add:
or if you're using jQuery:
This topic is now closed. New replies are no longer allowed.