mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
upgrade rc-calendar dependency to 9.3.0 (#8353)
This commit is contained in:
parent
250eed0fc9
commit
be1cbd4eae
@ -353,6 +353,21 @@ exports[`renders ./components/date-picker/demo/extra-footer.md correctly 1`] = `
|
||||
/>
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
class="ant-calendar-picker"
|
||||
>
|
||||
<div>
|
||||
<input
|
||||
class="ant-calendar-picker-input ant-input"
|
||||
placeholder="Select month"
|
||||
readonly=""
|
||||
value=""
|
||||
/>
|
||||
<span
|
||||
class="ant-calendar-picker-icon"
|
||||
/>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@ -627,7 +642,7 @@ exports[`renders ./components/date-picker/demo/size.md correctly 1`] = `
|
||||
<div>
|
||||
<input
|
||||
class="ant-calendar-picker-input ant-input"
|
||||
placeholder="Select date"
|
||||
placeholder="Select Month"
|
||||
readonly=""
|
||||
value=""
|
||||
/>
|
||||
@ -672,7 +687,7 @@ exports[`renders ./components/date-picker/demo/size.md correctly 1`] = `
|
||||
<span>
|
||||
<input
|
||||
class="ant-calendar-picker-input ant-input"
|
||||
placeholder="Select date"
|
||||
placeholder="Select Week"
|
||||
readonly=""
|
||||
value=""
|
||||
/>
|
||||
|
@ -10,243 +10,251 @@ exports[`MonthPicker and WeekPicker render MonthPicker 1`] = `
|
||||
tabindex="0"
|
||||
>
|
||||
<div
|
||||
class="ant-calendar-header"
|
||||
class="ant-calendar-month-calendar-content"
|
||||
>
|
||||
<div
|
||||
style="position:relative"
|
||||
class="ant-calendar-month-header-wrap"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-prev-year-btn"
|
||||
role="button"
|
||||
title="Last year (Control + left)"
|
||||
/>
|
||||
<a
|
||||
class="ant-calendar-prev-month-btn"
|
||||
role="button"
|
||||
title="Previous month (PageUp)"
|
||||
/>
|
||||
<span
|
||||
class="ant-calendar-my-select"
|
||||
<div
|
||||
class="ant-calendar-header"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-select"
|
||||
role="button"
|
||||
title="Choose a month"
|
||||
>
|
||||
1月
|
||||
</a>
|
||||
<a
|
||||
class="ant-calendar-year-select"
|
||||
role="button"
|
||||
title="Choose a year"
|
||||
>
|
||||
2000
|
||||
</a>
|
||||
</span>
|
||||
<a
|
||||
class="ant-calendar-next-month-btn"
|
||||
title="Next month (PageDown)"
|
||||
/>
|
||||
<a
|
||||
class="ant-calendar-next-year-btn"
|
||||
title="Next year (Control + right)"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="ant-calendar-month-panel"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="ant-calendar-month-panel-header"
|
||||
style="position:relative"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-prev-year-btn"
|
||||
class="ant-calendar-prev-year-btn"
|
||||
role="button"
|
||||
title="Last year (Control + left)"
|
||||
/>
|
||||
<a
|
||||
class="ant-calendar-month-panel-year-select"
|
||||
class="ant-calendar-prev-month-btn"
|
||||
role="button"
|
||||
title="Choose a year"
|
||||
title="Previous month (PageUp)"
|
||||
/>
|
||||
<span
|
||||
class="ant-calendar-my-select"
|
||||
>
|
||||
<span
|
||||
class="ant-calendar-month-panel-year-select-content"
|
||||
<a
|
||||
class="ant-calendar-month-select"
|
||||
role="button"
|
||||
title="Choose a month"
|
||||
>
|
||||
1月
|
||||
</a>
|
||||
<a
|
||||
class="ant-calendar-year-select"
|
||||
role="button"
|
||||
title="Choose a year"
|
||||
>
|
||||
2000
|
||||
</span>
|
||||
<span
|
||||
class="ant-calendar-month-panel-year-select-arrow"
|
||||
>
|
||||
x
|
||||
</span>
|
||||
</a>
|
||||
</a>
|
||||
</span>
|
||||
<a
|
||||
class="ant-calendar-month-panel-next-year-btn"
|
||||
role="button"
|
||||
class="ant-calendar-next-month-btn"
|
||||
title="Next month (PageDown)"
|
||||
/>
|
||||
<a
|
||||
class="ant-calendar-next-year-btn"
|
||||
title="Next year (Control + right)"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="ant-calendar-month-panel-body"
|
||||
class="ant-calendar-month-panel"
|
||||
>
|
||||
<table
|
||||
cellspacing="0"
|
||||
class="ant-calendar-month-panel-table"
|
||||
role="grid"
|
||||
>
|
||||
<tbody
|
||||
class="ant-calendar-month-panel-tbody"
|
||||
<div>
|
||||
<div
|
||||
class="ant-calendar-month-panel-header"
|
||||
>
|
||||
<tr
|
||||
role="row"
|
||||
<a
|
||||
class="ant-calendar-month-panel-prev-year-btn"
|
||||
role="button"
|
||||
title="Last year (Control + left)"
|
||||
/>
|
||||
<a
|
||||
class="ant-calendar-month-panel-year-select"
|
||||
role="button"
|
||||
title="Choose a year"
|
||||
>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell ant-calendar-month-panel-selected-cell"
|
||||
role="gridcell"
|
||||
title="一月"
|
||||
<span
|
||||
class="ant-calendar-month-panel-year-select-content"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
一月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="二月"
|
||||
2000
|
||||
</span>
|
||||
<span
|
||||
class="ant-calendar-month-panel-year-select-arrow"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
二月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="三月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
三月
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
role="row"
|
||||
x
|
||||
</span>
|
||||
</a>
|
||||
<a
|
||||
class="ant-calendar-month-panel-next-year-btn"
|
||||
role="button"
|
||||
title="Next year (Control + right)"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="ant-calendar-month-panel-body"
|
||||
>
|
||||
<table
|
||||
cellspacing="0"
|
||||
class="ant-calendar-month-panel-table"
|
||||
role="grid"
|
||||
>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="四月"
|
||||
<tbody
|
||||
class="ant-calendar-month-panel-tbody"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
<tr
|
||||
role="row"
|
||||
>
|
||||
四月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="五月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell ant-calendar-month-panel-selected-cell"
|
||||
role="gridcell"
|
||||
title="一月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
一月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="二月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
二月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="三月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
三月
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
role="row"
|
||||
>
|
||||
五月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="六月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="四月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
四月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="五月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
五月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="六月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
六月
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
role="row"
|
||||
>
|
||||
六月
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
role="row"
|
||||
>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="七月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="七月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
七月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="八月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
八月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="九月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
九月
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
role="row"
|
||||
>
|
||||
七月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="八月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
八月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="九月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
九月
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
role="row"
|
||||
>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="十月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
十月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="十一月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
十一月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="十二月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
十二月
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="十月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
十月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="十一月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
十一月
|
||||
</a>
|
||||
</td>
|
||||
<td
|
||||
class="ant-calendar-month-panel-cell"
|
||||
role="gridcell"
|
||||
title="十二月"
|
||||
>
|
||||
<a
|
||||
class="ant-calendar-month-panel-month"
|
||||
>
|
||||
十二月
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -15,7 +15,7 @@ Render extra footer in panel for customized requirements.
|
||||
|
||||
````jsx
|
||||
import { DatePicker } from 'antd';
|
||||
const { RangePicker } = DatePicker;
|
||||
const { RangePicker, MonthPicker } = DatePicker;
|
||||
|
||||
ReactDOM.render(
|
||||
<div>
|
||||
@ -23,6 +23,7 @@ ReactDOM.render(
|
||||
<DatePicker renderExtraFooter={() => 'extra footer'} showTime />
|
||||
<RangePicker renderExtraFooter={() => 'extra footer'} />
|
||||
<RangePicker renderExtraFooter={() => 'extra footer'} showTime />
|
||||
<MonthPicker renderExtraFooter={() => 'extra footer'} placeholder="Select month" />
|
||||
</div>
|
||||
, mountNode);
|
||||
````
|
||||
|
@ -39,11 +39,11 @@ class PickerSizesDemo extends React.Component {
|
||||
<br /><br />
|
||||
<DatePicker size={size} />
|
||||
<br />
|
||||
<MonthPicker size={size} />
|
||||
<MonthPicker size={size} placeholder="Select Month" />
|
||||
<br />
|
||||
<RangePicker size={size} />
|
||||
<br />
|
||||
<WeekPicker size={size} />
|
||||
<WeekPicker size={size} placeholder="Select Week" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -74,6 +74,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke
|
||||
| monthCellContentRender | Custom month cell content render method | function(date, locale): ReactNode | - |
|
||||
| value | to set date | [moment](http://momentjs.com/) | - |
|
||||
| onChange | a callback function, can be executed when the selected time is changing | function(date: moment, dateString: string) | - |
|
||||
| renderExtraFooter | render extra footer in panel | () => React.ReactNode | - |
|
||||
|
||||
### WeekPicker
|
||||
|
||||
|
@ -75,6 +75,7 @@ subtitle: 日期选择框
|
||||
| monthCellContentRender | 自定义的月份内容渲染方法 | function(date, locale): ReactNode | - |
|
||||
| value | 日期 | [moment](http://momentjs.com/) | 无 |
|
||||
| onChange | 时间发生变化的回调,发生在用户选择时间时 | function(date: moment, dateString: string) | - |
|
||||
| renderExtraFooter | 在面板中添加额外的页脚 | () => React.ReactNode | - |
|
||||
|
||||
### WeekPicker
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
.@{calendar-prefix-cls}-month {
|
||||
height: 248px;
|
||||
.@{calendar-prefix-cls}-month-header-wrap {
|
||||
position: relative;
|
||||
height: 288px;
|
||||
}
|
||||
.@{calendar-prefix-cls}-month-panel,
|
||||
.@{calendar-prefix-cls}-year-panel {
|
||||
top: 0;
|
||||
|
@ -51,7 +51,7 @@
|
||||
"omit.js": "^1.0.0",
|
||||
"prop-types": "^15.5.7",
|
||||
"rc-animate": "^2.4.1",
|
||||
"rc-calendar": "~9.2.0",
|
||||
"rc-calendar": "~9.3.0",
|
||||
"rc-cascader": "~0.12.0",
|
||||
"rc-checkbox": "~2.1.1",
|
||||
"rc-collapse": "~1.7.5",
|
||||
|
Loading…
Reference in New Issue
Block a user