diff --git a/components/timepicker/demo/no-default-value.md b/components/timepicker/demo/no-default-value.md new file mode 100644 index 0000000000..d2006ef903 --- /dev/null +++ b/components/timepicker/demo/no-default-value.md @@ -0,0 +1,16 @@ +无默认值 +==== + +- order: 5 + +没有默认时间。 + +--- + +````jsx +import { Timepicker } from 'antd'; + +ReactDOM.render( + +, document.getElementById('components-timepicker-demo-no-default-value')); +```` diff --git a/components/timepicker/index.jsx b/components/timepicker/index.jsx index 4da870cff4..d015140dcd 100644 --- a/components/timepicker/index.jsx +++ b/components/timepicker/index.jsx @@ -1,9 +1,6 @@ import React from 'react'; - import DateTimeFormat from 'gregorian-calendar-format'; - import TimePicker from 'rc-time-picker/lib/TimePicker'; -import TimePanel from 'rc-time-picker/lib/TimePanel'; // import defaultLocale from './locale'; import TimePickerLocale from 'rc-time-picker/lib/locale/zh_CN'; @@ -40,30 +37,8 @@ const AntTimepicker = React.createClass({ }); } - const timePanel = ( - - ); return ( - - { - ({value}) => { - return ( - - - - - ); - } - } - + ); } diff --git a/components/timepicker/index.md b/components/timepicker/index.md index c1e6a5ad0f..fa08e75724 100644 --- a/components/timepicker/index.md +++ b/components/timepicker/index.md @@ -21,12 +21,13 @@ API ``` -| 参数 | 说明 | 类型 | 默认值 | -|---------------|---------------------------------------------------------------|----------|-----------------------------------------------------------------| -| defaultValue | 默认时间 | string | 无 | -| format | 展示的时间格式 | string | "HH:mm:ss"、"HH:mm"、"mm:ss" | -| disabled | 禁用 | bool | false | -| hourOptions | 特定可选择的小时 | array | 0 到 24 组成的数组 | +| 参数 | 说明 | 类型 | 默认值 | +|-----------------|-----|-----|-------| +| defaultValue | 默认时间 | string | 无 | +| placeholder | 没有值的时候显示的内容 | string | "请选择时间" | +| format | 展示的时间格式 | string | "HH:mm:ss"、"HH:mm"、"mm:ss" | +| disabled | 禁用 | bool | false | +| hourOptions | 特定可选择的小时 | array | 0 到 24 组成的数组 | | minuteOptions | 特定可选择的分钟 | array | 0 到 60 组成的数组 | | secondOptions | 特定可选择的秒 | array | 0 到 60 组成的数组 | diff --git a/package.json b/package.json index ce5513af38..fbbaf5d1ee 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "rc-switch": "~1.3.1", "rc-table": "~3.6.1", "rc-tabs": "~5.5.0", - "rc-time-picker": "~0.2.0", + "rc-time-picker": "~0.3.3", "rc-tooltip": "~3.2.0", "rc-tree": "~0.19.0", "rc-trigger": "~1.0.6", diff --git a/style/components/timepicker/Picker.less b/style/components/timepicker/Picker.less index f4c6b5ddea..078ce8c579 100644 --- a/style/components/timepicker/Picker.less +++ b/style/components/timepicker/Picker.less @@ -5,8 +5,8 @@ font-size: @font-size-base; transition: opacity 0.3s ease; - &-input { - outline: none; + > input { + .ant-input; width: 100px; }