mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
Merge branch 'master' into develop-0.10.0
This commit is contained in:
commit
8e00cdedf4
@ -11,6 +11,6 @@
|
||||
var Datepicker = antd.Datepicker;
|
||||
|
||||
React.render(
|
||||
<Datepicker />
|
||||
<Datepicker defaultValue="2012-12-12" />
|
||||
, document.getElementById('components-datepicker-demo-basic'));
|
||||
````
|
||||
|
@ -15,7 +15,6 @@ Locale.shortMonths = ['1月', '2月', '3月', '4月', '5月', '6月',
|
||||
let defaultCalendarValue = new GregorianCalendar(zhCn);
|
||||
defaultCalendarValue.setTime(Date.now());
|
||||
|
||||
|
||||
function createPicker(TheCalendar) {
|
||||
return React.createClass({
|
||||
getInitialState() {
|
||||
@ -73,6 +72,11 @@ function createPicker(TheCalendar) {
|
||||
} else if (this.props.size === 'small') {
|
||||
sizeClass = ' ant-input-sm';
|
||||
}
|
||||
let defaultValue;
|
||||
if (this.props.defaultValue) {
|
||||
defaultValue = new GregorianCalendar(zhCn);
|
||||
defaultValue.setTime(new Date(this.props.defaultValue).valueOf());
|
||||
}
|
||||
return (
|
||||
<Datepicker
|
||||
transitionName={this.props.transitionName}
|
||||
@ -82,7 +86,7 @@ function createPicker(TheCalendar) {
|
||||
adjustOrientOnCalendarOverflow={{x: true, y: false}}
|
||||
formatter={new DateTimeFormat(this.props.format)}
|
||||
value={this.state.value}
|
||||
defaultValue={this.props.defaultValue}
|
||||
defaultValue={defaultValue}
|
||||
prefixCls="ant-calendar-picker"
|
||||
style={this.props.style}
|
||||
onChange={this.handleChange}>
|
||||
|
@ -16,11 +16,6 @@ function info() {
|
||||
content: '一些附加信息一些附加信息一些附加信息',
|
||||
onOk: function() {}
|
||||
});
|
||||
Modal.info({
|
||||
title: '这是一条通知信息',
|
||||
content: '一些附加信息一些附加信息一些附加信息',
|
||||
onOk: function() {}
|
||||
});
|
||||
}
|
||||
|
||||
function success() {
|
||||
|
Loading…
Reference in New Issue
Block a user