$.ajax({
url: $(waterIndexModel.addWaterChargesURL).val(),
success: function (data) {
$(waterIndexModel.addWaterChargePlaceHolder).html('');
$(waterIndexModel.addWaterChargePlaceHolder).html(data);
$(waterIndexModel.addWaterChargeModal).modal('show');
$(waterIndexModel.saveWaterChargesBtn).on('click', function () { waterIndexModel.saveWaterCharge() })
$("#ChargeDate").datepicker({
onSelect: function () {
$(this).trigger("focus").trigger("blur");
}
});
waterIndexModel.EnableValidators(waterIndexModel.addWaterChargeForm);
},
error: function (error) {
alert(error.responseText);
}
});
为什么日期选择器上的onSelect事件不会触发?如果我没有误解,则在选择日期时应该触发。如您所见,我已将其简化为尽可能简单