我尝试了很多解决方案,以便在日期选择器中对on change
值事件发出提醒,但它不起作用,请您提问
<div class="input-box">
<input type="text" id="datepicker" class="input-text required-entry" name="delivery[date]">
</div>
jQuery( "#datepicker" ).datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(dateText, inst) {
var date = jQuery(this).datepicker('getDate');
var todaydate = "<?php echo date('Y-m-d')?>";
dayOfWeek = weekday[date.getUTCDay()];
jQuery('#datepicker').attr('data-day',dayOfWeek);
gettimeslots();
},
});
我测试过:
$('#datepicker').on('input',function(e){
alert('Changed');
});
jQuery(function() {
jQuery( "#datepicker" ).datepicker({
onSelect: function() {
alert('Changed');
}});