我有一個問題來自定義Magento日曆在前端: 我想禁用今天之前的日子,這已經有效,但我不能選擇實際月份中的日期。Magento日曆:Datepicker問題在今天之前禁用
但是,如果我點擊下個月的任何一個日期並返回到當前月份,那麼我可以選擇日期!!!!!!
這裏是我的代碼:
function disabledDate(date) {
var today = new Date();
if(date <= today){
return true;
} else {
return false;
}
};
Calendar.setup({
inputField : 'date',
ifFormat : '%e/%m/%Y',
button : 'date_from_trig',
align : 'Bl',
singleClick : true,
dateStatusFunc : disabledDate
});
感謝您的幫助。