Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove DatePicker legacy cell className #21589

Merged
merged 1 commit into from
Feb 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/date-picker/demo/date-render.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ReactDOM.render(
style.borderRadius = '50%';
}
return (
<div className="ant-calendar-date" style={style}>
<div className="ant-picker-cell-inner" style={style}>
{current.date()}
</div>
);
Expand All @@ -42,7 +42,7 @@ ReactDOM.render(
style.borderRadius = '50%';
}
return (
<div className="ant-calendar-date" style={style}>
<div className="ant-picker-cell-inner" style={style}>
{current.date()}
</div>
);
Expand Down
7 changes: 3 additions & 4 deletions components/date-picker/style/panel.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@import './index';

@picker-cell-inner-cls: ~'@{picker-prefix-cls}-cell-inner';
@picker-legacy-cell-cls: ~'@{ant-prefix}-calendar-date';

.@{picker-prefix-cls} {
@picker-arrow-size: 7px;
Expand Down Expand Up @@ -428,7 +427,6 @@
}

.picker-cell-inner(~'@{picker-cell-inner-cls}');
.picker-cell-inner(~'@{picker-legacy-cell-cls}');
}

&-decade-panel,
Expand Down Expand Up @@ -707,11 +705,12 @@
// https://github.com/ant-design/ant-design/issues/21559
// https://codepen.io/afc163-1472555193/pen/mdJRaNj?editors=0110
/* stylelint-disable-next-line */
_:-ms-fullscreen, :root {
_:-ms-fullscreen,
:root {
.@{picker-prefix-cls}-range-wrapper {
.@{picker-prefix-cls}-month-panel .@{picker-prefix-cls}-cell,
.@{picker-prefix-cls}-year-panel .@{picker-prefix-cls}-cell {
padding: 21px 0;
}
}
}
}
1 change: 1 addition & 0 deletions docs/react/migration-v4.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ const Demo = () => (
- Provide the `picker` property for selector switching.
- Range selection can now select start and end times individually.
- `onPanelChange` will also trigger when panel value changed.
- [Date cell className of Custom style demo](/components/date-picker/#components-date-picker-demo-date-render) changed from `ant-calendar-date` to `ant-picker-cell-inner`.
- Tree, Select, TreeSelect, AutoComplete rewrite
- use virtual scrolling.
- `onBlur` no longer trigger value change.
Expand Down
1 change: 1 addition & 0 deletions docs/react/migration-v4.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ const Demo = () => (
- 提供 `picker` 属性用于选择器切换。
- 范围选择现在可以单独选择开始和结束时间。
- `onPanelChange` 在面板值变化时也会触发。
- [自定义单元格样式](/components/date-picker-cn/#components-date-picker-demo-date-render)的类名从 `ant-calendar-date` 改为 `ant-picker-cell-inner`。
- Tree、Select、TreeSelect、AutoComplete 重新写
- 使用虚拟滚动。
- `onBlur` 时不再修改选中值。
Expand Down