Skip to content

Commit

Permalink
add timeZone prop for some components (rsuite#1176)
Browse files Browse the repository at this point in the history
* refactor: 💡 调整 date-picker 实现

* refactor: 💡 调整 calendar-panel 实现

* feat: 🎸 新增 CalendarPanel TimeZone API

* test: 💍 修正CalendarPanel测试用例

* refactor: 💡 TimePicker 适配TimeZone属性

* feat: 🎸 新增 DatePicker TimeZone API

* test: 💍 新增 DatePicker 测试用例

* feat: 🎸 新增 DateRangePicker TimeZone API

* fix: 🐛 绕开 timeZone format 工具格式化错误的问题

* fix: 🐛 修正 date-range-picker 适配 timezone 的相关问题

* test: 💍 增加 date-range-picker 测试用例

* refactor: 💡 调整 date-range-picker 实现

* refactor: 💡 调整 calendar-panel 关于 pageDate 部分的实现

* test: 💍 调整 CalendarPanel/DatePicker/DateRangePicker 测试用例

* docs: ✏️ update docs of timezone

* docs: ✏️ 增加 DatePicker TimeZone API 示例

* docs: ✏️ 新增 DateRangePicker TimeZone API 示例

* docs: ✏️ 增加 Calendar TimeZone API 示例

* test: 💍 调整 CalendarPanel 测试用例

* docs: ✏️ 增加与 TimeZonePicker 配合的时区属性示例

* docs: ✏️ remove calendar docs of timezone

* fix: 🐛 修复 Toggle.d.ts 缺少 size 属性声明

* test: 💍 补充 DateRangePicker 测试用例

* docs: ✏️ update DatePicker/DateRangePicker timezone docs

* chore: 🤖 clean code

* chore: 🤖 format code

* refactor: 💡 更新 TimeZonePicker 依赖 & 更新文档

* docs: ✏️ update extensions docs

* fix: 🐛 fixed propTypes

* test: 💍 调整 CalendarPanel 测试用例

* docs: ✏️ 调整文档链接

* fix: 🐛 调整 DatePicker 实现

* fix: 调整 DatePicker 实现

* fix: 排除 isoWeek 传递到 dom

* fix: 🐛 修复 DatePicker disabledDate 属性回传不正确的问题 & 增加相关测试用例

* fix: 🐛 修复 DatePicker disabledTime/hideTime 回调传入参数不正确及增加测试用例

* fix: 调整 DateRangePicker 关于 TimeZone 属性的实现

* fix: 🐛 修复 DatePicker DateRangePicker Toolbar 没有随着 timeZone 变化

* chore: clean code

* fix: 🐛 修复 CalendarPanel renderCell 参数回传不正确的问题

* fix: 🐛 修复 CalendarPanel onSelect 被覆盖的问题

* fix: 🐛 修复CalendarPanel 无法切换月份的问题

* fix: 🐛 修复当 timeZone 更新的时候 pageDate 更新不正确导致崩溃的问题

* test: 💍 调整 DatePickerSpec 测试用例

* refactor: 💡 更新 timezone-picker 依赖
  • Loading branch information
雷玮杰 authored Aug 3, 2020
1 parent afc31ea commit d348d79
Show file tree
Hide file tree
Showing 51 changed files with 1,605 additions and 202 deletions.
2 changes: 2 additions & 0 deletions docs/less/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
@import './markdown';
@import './code-view';
@import '~@rsuite/document-nav/lib/less/index.less';
@import '~@rsuite/timezone-picker/lib/styles/index.less';


/** Components **/
@import '../components/SearchDrawer/styles';
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"license": "MIT",
"dependencies": {
"@rsuite/responsive-nav": "0.0.10",
"@rsuite/timezone-picker": "^0.3.0",
"color": "^3.1.2",
"date-fns": "^2.13.0",
"eslint-import-resolver-alias": "^1.1.2",
Expand Down
1 change: 1 addition & 0 deletions docs/pages/components/calendar/en-US/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ import { Calendar } from 'rsuite';
| onSelect | (date:Date) => void | Callback fired before the date selected |
| renderCell | (date: Date) => React.Node | Custom render calendar cells |
| value | Date | Controlled value |
| timeZone | string | [IANA Time zone name](/components/date-picker#Time%20Zone%20List) |
1 change: 1 addition & 0 deletions docs/pages/components/calendar/zh-CN/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ import { Calendar } from 'rsuite';
| onSelect | (date:Date) => void | 选择日期后的回调函数 |
| renderCell | (date: Date) => React.Node | 自定义渲染日历单元格 |
| value | Date | 值 (`受控`) |
| timeZone | string | [IANA 时区名](/zh/components/date-picker#Time%20Zone%20List) |
Loading

0 comments on commit d348d79

Please sign in to comment.