upgrade rc-calendar dependency to 9.3.0 (#8353)

This commit is contained in:
niko 2017-11-29 11:23:15 +08:00 committed by 偏右
parent 250eed0fc9
commit be1cbd4eae
8 changed files with 242 additions and 213 deletions

View File

@ -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=""
/>

View File

@ -8,6 +8,12 @@ exports[`MonthPicker and WeekPicker render MonthPicker 1`] = `
<div
class="ant-calendar ant-calendar-month ant-calendar-month-calendar"
tabindex="0"
>
<div
class="ant-calendar-month-calendar-content"
>
<div
class="ant-calendar-month-header-wrap"
>
<div
class="ant-calendar-header"
@ -254,6 +260,8 @@ exports[`MonthPicker and WeekPicker render MonthPicker 1`] = `
</div>
</div>
</div>
</div>
</div>
`;
exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `

View File

@ -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);
````

View File

@ -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>
);
}

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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",