|
@@ -25,7 +25,7 @@ class Calendar extends React.Component {
|
|
select:{
|
|
select:{
|
|
year: this.year,
|
|
year: this.year,
|
|
month: this.month,
|
|
month: this.month,
|
|
- day: 0,
|
|
|
|
|
|
+ day: 0,//这里设置初始选中的值
|
|
hour:0,
|
|
hour:0,
|
|
minute:0,
|
|
minute:0,
|
|
second:0
|
|
second:0
|
|
@@ -59,6 +59,7 @@ class Calendar extends React.Component {
|
|
this.inputing=true;
|
|
this.inputing=true;
|
|
info.year=this.state.year;
|
|
info.year=this.state.year;
|
|
info.month=this.state.month;
|
|
info.month=this.state.month;
|
|
|
|
+ // info.day = this.day;//没选日就加上默认值
|
|
if(info.hour==null){
|
|
if(info.hour==null){
|
|
info.hour=this.state.select.hour;
|
|
info.hour=this.state.select.hour;
|
|
info.minute=this.state.select.minute;
|
|
info.minute=this.state.select.minute;
|
|
@@ -88,7 +89,6 @@ class Calendar extends React.Component {
|
|
genTimeComponent(){
|
|
genTimeComponent(){
|
|
return this.props.needTime?<Time hour={this.state.select.hour} minute={this.state.select.minute} second={this.state.select.second} handleChange={(info)=>{this.handleChange(info)}}/>:null;
|
|
return this.props.needTime?<Time hour={this.state.select.hour} minute={this.state.select.minute} second={this.state.select.second} handleChange={(info)=>{this.handleChange(info)}}/>:null;
|
|
}
|
|
}
|
|
-
|
|
|
|
render() {
|
|
render() {
|
|
return (
|
|
return (
|
|
<div className={style.wrapper}>
|
|
<div className={style.wrapper}>
|