Skip to content

Commit

Permalink
fix: #1352
Browse files Browse the repository at this point in the history
  • Loading branch information
Wugaoliang committed Nov 20, 2020
1 parent ed19efe commit b4e6780
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- 修复 `Table` 列操作 icon 丢失问题 [#1336](https://github.com/XiaoMi/hiui/issues/1336)
- 修复 `Table` 表头吸顶层级显示问题 [#1318](https://github.com/XiaoMi/hiui/issues/1318)
- 修复 `Table` 内嵌式设置列宽不正确的问题 [#1325](https://github.com/XiaoMi/hiui/issues/1325)
- 修复 `DatePicker` weekOffset 为 1 时 周与日对照显示异常 [#1352](https://github.com/XiaoMi/hiui/issues/1352)
- 新增 HiUI 基础样式 css 文件 [#1388](https://github.com/XiaoMi/hiui/issues/1388)

## 3.1.0
Expand Down
3 changes: 2 additions & 1 deletion components/date-picker/hooks/useCalenderData.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ const getDateRows = ({ originDate, range, type, weekOffset, min, max, renderDate
// * lastMonthDayCount: 上月总天数
// * firstDayWeek: 当月第一天是周几
let firstDayWeek = _date.startOf('month').day() - weekOffset
console.log('firstDayWeek', firstDayWeek)
if (firstDayWeek === 0) {
// 如果为0 代表该月第一天是周日,在日历上需要第二行开始显示
firstDayWeek = 7
} else if (!type.includes('range')) {
} else if (firstDayWeek < 0) {
firstDayWeek = 6
}
const startTimeByCurrentPanel = getTime(firstDayWeek, _date.year(), _date.month() + 1)
Expand Down

0 comments on commit b4e6780

Please sign in to comment.