Merge branch 'master' into develop-0.10.0

This commit is contained in:
afc163 2015-10-15 11:26:32 +08:00
commit 8e00cdedf4
3 changed files with 7 additions and 8 deletions

View File

@ -11,6 +11,6 @@
var Datepicker = antd.Datepicker; var Datepicker = antd.Datepicker;
React.render( React.render(
<Datepicker /> <Datepicker defaultValue="2012-12-12" />
, document.getElementById('components-datepicker-demo-basic')); , document.getElementById('components-datepicker-demo-basic'));
```` ````

View File

@ -15,7 +15,6 @@ Locale.shortMonths = ['1月', '2月', '3月', '4月', '5月', '6月',
let defaultCalendarValue = new GregorianCalendar(zhCn); let defaultCalendarValue = new GregorianCalendar(zhCn);
defaultCalendarValue.setTime(Date.now()); defaultCalendarValue.setTime(Date.now());
function createPicker(TheCalendar) { function createPicker(TheCalendar) {
return React.createClass({ return React.createClass({
getInitialState() { getInitialState() {
@ -73,6 +72,11 @@ function createPicker(TheCalendar) {
} else if (this.props.size === 'small') { } else if (this.props.size === 'small') {
sizeClass = ' ant-input-sm'; sizeClass = ' ant-input-sm';
} }
let defaultValue;
if (this.props.defaultValue) {
defaultValue = new GregorianCalendar(zhCn);
defaultValue.setTime(new Date(this.props.defaultValue).valueOf());
}
return ( return (
<Datepicker <Datepicker
transitionName={this.props.transitionName} transitionName={this.props.transitionName}
@ -82,7 +86,7 @@ function createPicker(TheCalendar) {
adjustOrientOnCalendarOverflow={{x: true, y: false}} adjustOrientOnCalendarOverflow={{x: true, y: false}}
formatter={new DateTimeFormat(this.props.format)} formatter={new DateTimeFormat(this.props.format)}
value={this.state.value} value={this.state.value}
defaultValue={this.props.defaultValue} defaultValue={defaultValue}
prefixCls="ant-calendar-picker" prefixCls="ant-calendar-picker"
style={this.props.style} style={this.props.style}
onChange={this.handleChange}> onChange={this.handleChange}>

View File

@ -16,11 +16,6 @@ function info() {
content: '一些附加信息一些附加信息一些附加信息', content: '一些附加信息一些附加信息一些附加信息',
onOk: function() {} onOk: function() {}
}); });
Modal.info({
title: '这是一条通知信息',
content: '一些附加信息一些附加信息一些附加信息',
onOk: function() {}
});
} }
function success() { function success() {