diff --git a/src/form/select.wc b/src/form/select.wc index 07ab2e5..82cd31d 100644 --- a/src/form/select.wc +++ b/src/form/select.wc @@ -96,7 +96,6 @@ width: 200px; height: auto; max-height: 200px; - min-height: 46px; padding: 8px 0; border-radius: 4px; background: #fff; diff --git a/src/picker/date.wc b/src/picker/date.wc index b0b8b35..93d7438 100644 --- a/src/picker/date.wc +++ b/src/picker/date.wc @@ -238,6 +238,8 @@ function getCalendarTable({ year, month, max, min, last }) { let isLimitYM = isLimited({ max, min }, { year, month }) let list = [] + log(year, month, nums, numsFixed) + for (let i = numsFixed; i <= nums; i++) { let day = { weekend: false, @@ -321,7 +323,7 @@ function getThisYearMonth() { //根据年份获取指定月份天数 function getTotalDays(year, month) { - return new Date(year, month, 0).getDate() + return new Date(year, month + 1, 0).getDate() } //判断指定年月第一天是星期几 @@ -460,6 +462,7 @@ export default class DatePicker { _renderCalendar() { var { calendar, max, min, last } = this.props + calendar.list = getCalendarTable({ ...calendar, max, min, last }) this.__CTRL__.children[2].textContent = `${ diff --git a/src/utils.js b/src/utils.js index fafd1a6..06afcfd 100644 --- a/src/utils.js +++ b/src/utils.js @@ -95,7 +95,7 @@ export const clickOutside = function(dom, fn = noop) { if (dom === target || dom.contains(target)) { return } - fn(ev) } + fn(ev) }) }