修改 datepicker.js内的
layout 方法
function(el) { var options = $(el).data(‘datepicker‘); var cal = $(‘#‘ + options.id); if (options.extraHeight === false) { var divs = $(el).find(‘div‘); options.extraHeight = divs.get(0).offsetHeight + divs.get(1).offsetHeight; // heights from top/bottom borders options.extraWidth = divs.get(2).offsetWidth + divs.get(3).offsetWidth; // widths from left/right borders } var tbl = cal.find(‘table:first‘).get(0); var width = tbl.offsetWidth; var height = tbl.offsetHeight; cal.css({ width: width + options.extraWidth + ‘px‘, height: height + options.extraHeight + ‘px‘ }).find(‘div.datepickerContainer‘).css({ // cdp 修改位置+30 width: width + 30+‘px‘, height: height + ‘px‘ }); }
时间: 2024-12-26 20:39:46