From ef54b60add03551e7726ff590145b51ee9e292a1 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Fri, 2 Jun 2017 14:28:56 +0800 Subject: [PATCH] docs: add docs for TimePicker[defaultOpenValue], close: #6336 --- components/time-picker/demo/basic.md | 6 +++++- components/time-picker/index.en-US.md | 1 + components/time-picker/index.zh-CN.md | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/time-picker/demo/basic.md b/components/time-picker/demo/basic.md index 118df8f67e..bb63f8e92f 100644 --- a/components/time-picker/demo/basic.md +++ b/components/time-picker/demo/basic.md @@ -15,10 +15,14 @@ Click `TimePicker`, and then we could select or input a time in panel. ````jsx import { TimePicker } from 'antd'; +import moment from 'moment'; function onChange(time, timeString) { console.log(time, timeString); } -ReactDOM.render(, mountNode); +ReactDOM.render( + , + mountNode +); ```` diff --git a/components/time-picker/index.en-US.md b/components/time-picker/index.en-US.md index b221ae8e95..d7775121c2 100644 --- a/components/time-picker/index.en-US.md +++ b/components/time-picker/index.en-US.md @@ -23,6 +23,7 @@ import moment from 'moment'; |---------------------|-----|-----|-------| | defaultValue | to set default time | [moment](http://momentjs.com/) | - | | value | to set time | [moment](http://momentjs.com/) | - | +| defaultOpenValue | to highlight values in panel when there is no selected value | [moment](http://momentjs.com/) | moment() | | open | whether to popup panel | boolean | false | | onOpenChange | a callback function which will be called while panel opening/closing | (open: boolean): void | - | | placeholder | display when there's no value | string | "Select a time" | diff --git a/components/time-picker/index.zh-CN.md b/components/time-picker/index.zh-CN.md index b029d537cb..3abde1db7c 100644 --- a/components/time-picker/index.zh-CN.md +++ b/components/time-picker/index.zh-CN.md @@ -24,6 +24,7 @@ import moment from 'moment'; |---------------------|-----|-----|-------| | defaultValue | 默认时间 | [moment](http://momentjs.com/) | 无 | | value | 当前时间 | [moment](http://momentjs.com/) | 无 | +| defaultOpenValue | 无选中值时,面板打开时高亮的值 | [moment](http://momentjs.com/) | moment() | | open | 面板是否打开 | boolean | false | | onOpenChange | 面板打开/关闭时的回调 | (open: boolean): void | 无 | | placeholder | 没有值的时候显示的内容 | string | "请选择时间" |