From d4269f8f3041b1b658904c26c892ece2b611af82 Mon Sep 17 00:00:00 2001 From: RaoHai Date: Mon, 14 Nov 2016 11:56:05 +0800 Subject: [PATCH] fix `format` props of RangePicker + close #3808 --- components/date-picker/RangePicker.tsx | 6 +++++- components/date-picker/demo/disabled-date.md | 7 ++++--- components/date-picker/index.tsx | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/components/date-picker/RangePicker.tsx b/components/date-picker/RangePicker.tsx index bcc6693f36..637be7b272 100644 --- a/components/date-picker/RangePicker.tsx +++ b/components/date-picker/RangePicker.tsx @@ -46,7 +46,10 @@ export default class RangePicker extends React.Component { render() { const props = this.props; - const { disabledDate, disabledTime, showTime, prefixCls, popupStyle, style, onOk, locale } = props; + const { disabledDate, disabledTime, showTime, + prefixCls, popupStyle, style, onOk, locale, + format, + } = props; const state = this.state; const calendarClassName = classNames({ @@ -74,6 +77,7 @@ export default class RangePicker extends React.Component { const calendar = (
- - -, mountNode); + + , + mountNode +); ```` diff --git a/components/date-picker/index.tsx b/components/date-picker/index.tsx index 105ddeb8d2..7901eefd0a 100755 --- a/components/date-picker/index.tsx +++ b/components/date-picker/index.tsx @@ -55,7 +55,7 @@ export interface RangePickerProps extends PickerProps { } assign(DatePicker, { - RangePicker: wrapPicker(RangePicker), + RangePicker: wrapPicker(RangePicker, 'YYYY-MM-DD hh:mm:ss'), Calendar, MonthPicker, });