Merge pull request #928 from ant-design/fix-date-picker

fix: should pass formatter to rc-calendar #917
This commit is contained in:
afc163 2016-01-26 12:04:46 +08:00
commit a8826667d0
3 changed files with 3 additions and 1 deletions

View File

@ -78,6 +78,7 @@ export default React.createClass({
const calendar = (
<RangeCalendar prefixCls="ant-calendar"
formatter={this.getFormatter()}
className={calendarClassName}
timePicker={timePicker}
disabledDate={disabledDate}

View File

@ -16,6 +16,6 @@ function onChange(value) {
ReactDOM.render(<div>
<RangePicker style={{width: 184}} onChange={onChange} />
<br />
<RangePicker showTime format="yyyy-MM-dd HH:mm:ss" onChange={onChange} />
<RangePicker showTime format="yyyy/MM/dd HH:mm:ss" onChange={onChange} />
</div>, mountNode);
````

View File

@ -69,6 +69,7 @@ function createPicker(TheCalendar, defaultFormat) {
const calendar = (
<TheCalendar
formatter={this.getFormatter()}
disabledDate={this.props.disabledDate}
locale={locale.lang}
timePicker={timePicker}