The browser simply does not fire the changeevent in these cases (setting the value of the script), if you want to find out when it will happen, you can use the onSelecthandler for datepicker, for example:
$(function() {
$("#datepicker").datepicker({
altField: '#dateIntermediate',
onSelect: function() {
alert('Current #dateIntermediate value: ' + $("#dateIntermediate").val());
}
});
});
. , , change, , :
$(function() {
$("#datepicker").datepicker({
altField: '#dateIntermediate',
onSelect: function() {
$("#dateIntermediate").change();
}
});
$('#dateIntermediate').change(function(){
console.log("dateIntermediate changed");
});
});
, $(window).ready(function() { });, $(document).ready(function() { });, $(function() { });. , $(anything).ready() , , :)