【发布时间】:2012-02-03 10:15:22
【问题描述】:
我正在使用日期选择器表单 jQuery-ui-1.8.16。
我有以下代码:
Site.Calendar = function() {
// Set default setting for all calendars
jQuery.datepicker.setDefaults({
showOn : 'both',
buttonImageOnly : true,
buttonText: '',
changeMonth : true,
changeYear : true,
showOtherMonths : true,
selectOtherMonths : true,
showButtonPanel : true,
dateFormat : "D, d M, yy",
showAnim : "slideDown",
onSelect: Site.Calendar.customiseTodayButton
});
};
Site.Calendar.customiseTodayButton = function(dateText, inst) {
console.log("hello");
};
我的 customiseTodayButton 函数只有在我选择实际日期而不是在今天按钮上时才会触发。
有什么方法可以覆盖 jQuery 日期选择器中今天按钮的工作方式吗?
谢谢
【问题讨论】:
标签: jquery-ui jquery-ui-datepicker