mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
不应该设置默认值
This commit is contained in:
parent
b0d5b31e11
commit
bb486a6a60
@ -9,6 +9,6 @@
|
||||
var Datepicker = antd.datepicker;
|
||||
|
||||
React.render(
|
||||
<Datepicker value="2015-01-01" />
|
||||
<Datepicker value="" />
|
||||
, document.getElementById('components-datepicker-demo-basic'));
|
||||
````
|
||||
|
@ -9,6 +9,6 @@
|
||||
var Datepicker = antd.datepicker;
|
||||
|
||||
React.render(
|
||||
<Datepicker format="yyyy/MM/dd" />
|
||||
<Datepicker value="2015/01/01" format="yyyy/MM/dd" />
|
||||
, document.getElementById('components-datepicker-demo-formatter'));
|
||||
````
|
||||
|
@ -9,10 +9,8 @@ var DateTimeFormat = require('gregorian-calendar-format');
|
||||
|
||||
module.exports = React.createClass({
|
||||
getInitialState: function () {
|
||||
var value = new GregorianCalendar(zhCn);
|
||||
value.setTime(Date.now());
|
||||
return {
|
||||
value: value
|
||||
value: ''
|
||||
};
|
||||
},
|
||||
getDefaultProps: function () {
|
||||
@ -35,7 +33,6 @@ module.exports = React.createClass({
|
||||
this.props.onSelect(new Date(this.state.value.getTime()));
|
||||
},
|
||||
render: function () {
|
||||
console.log(this.props.showTime);
|
||||
var calendar = (
|
||||
<Calendar
|
||||
disabledDate={this.state.disabled}
|
||||
@ -51,7 +48,7 @@ module.exports = React.createClass({
|
||||
formatter={new DateTimeFormat(this.props.format)}
|
||||
value={this.state.value}
|
||||
onChange={this.props.onSelect}>
|
||||
<input className="rc-calendar-picker-input" />
|
||||
<input placeholder="请选择日期" className="rc-calendar-picker-input" />
|
||||
</DatePicker>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user