Browse Source

chore: update details for #6584

pull/6646/head
Benjy Cui 8 years ago
parent
commit
1920d9af46
  1. 6
      components/date-picker/RangePicker.tsx
  2. 4
      components/date-picker/createPicker.tsx
  3. 4
      components/date-picker/index.en-US.md
  4. 1
      components/date-picker/index.tsx
  5. 1
      components/date-picker/index.zh-CN.md

6
components/date-picker/RangePicker.tsx

@ -222,13 +222,11 @@ export default class RangePicker extends React.Component<any, any> {
/>
) : null;
const className = classNames(props.className, props.pickerInputClass);
const input = ({ value: inputValue }) => {
const start = inputValue[0];
const end = inputValue[1];
return (
<span className={className} disabled={props.disabled}>
<span className={props.pickerInputClass} disabled={props.disabled}>
<input
disabled={props.disabled}
readOnly
@ -251,7 +249,7 @@ export default class RangePicker extends React.Component<any, any> {
};
return (
<span className={props.pickerClass} style={assign({}, style, pickerStyle)}>
<span className={classNames(props.className, props.pickerClass)} style={assign({}, style, pickerStyle)}>
<RcDatePicker
{...props}
{...pickerChangeHandler}

4
components/date-picker/createPicker.tsx

@ -135,7 +135,7 @@ export default function createPicker(TheCalendar): any {
) : null;
const input = ({ value: inputValue }) => (
<div className={props.className}>
<div>
<input
disabled={props.disabled}
readOnly
@ -154,7 +154,7 @@ export default function createPicker(TheCalendar): any {
pickerValue.locale(localeCode);
}
return (
<span className={props.pickerClass} style={assign({}, props.style, pickerStyle)}>
<span className={classNames(props.className, props.pickerClass)} style={assign({}, props.style, pickerStyle)}>
<RcDatePicker
{...props}
{...pickerChangeHandler}

4
components/date-picker/index.en-US.md

@ -38,6 +38,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker.
|--------------|----------------|----------|--------------|
| allowClear | Whether to show clear button | boolean | true |
| disabled | determine whether the DatePicker is disabled | boolean | false |
| className | picker className | string | '' |
| style | to customize the style of the input box | object | {} |
| popupStyle | to customize the style of the popup calendar | object | {} |
| size | determine the size of the input box, the height of `large` and `small`, are 32px and 22px respectively, while default size is 28px | string | - |
@ -62,7 +63,6 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker.
| disabledTime | to specify the time that cannot be selected | function(date) | - |
| onOk | callback when click ok button | function() | - |
| renderExtraFooter | render extra footer in panel | () => React.ReactNode | - |
| className | picker className | string | '' |
### MonthPicker
@ -73,7 +73,6 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker.
| format | to set the date format, refer to [moment.js](http://momentjs.com/) | string | "YYYY-MM" |
| onChange | a callback function, can be executed when the selected time is changing | function(date: moment, dateString: string) | - |
| monthCellContentRender | Custom month cell content render method | function(date, locale): ReactNode | - |
| className | picker className | string | '' |
### RangePicker
@ -89,7 +88,6 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker.
| ranges | preseted ranges for quick selection | { [range: string]: [moment](http://momentjs.com/)[] } | - |
| renderExtraFooter | render extra footer in panel | () => React.ReactNode | - |
| onOk | callback when click ok button | function() | - |
| className | picker className | string | '' |
<style>
.code-box-demo .ant-calendar-picker {

1
components/date-picker/index.tsx

@ -15,6 +15,7 @@ export interface PickerProps {
format?: string;
disabled?: boolean;
allowClear?: boolean;
className?: string;
style?: React.CSSProperties;
popupStyle?: React.CSSProperties;
locale?: any;

1
components/date-picker/index.zh-CN.md

@ -39,6 +39,7 @@ moment.locale('zh-cn');
|--------------|----------------|----------|--------------|
| allowClear | 是否显示清除按钮 | boolean | true |
| disabled | 禁用 | boolean | false |
| className | 选择器 className | string | '' |
| style | 自定义输入框样式 | object | {} |
| popupStyle | 格外的弹出日历样式 | object | {} |
| size | 输入框大小,`large` 高度为 32px,`small` 为 22px,默认是 28px | string | 无 |

Loading…
Cancel
Save