Explorar o código

日期组件详细看看

Luolei %!s(int64=6) %!d(string=hai) anos
pai
achega
1b8ea52cf3

+ 2 - 2
src/common/components/Calendar/index.jsx

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

+ 0 - 1
src/components/AssistCheck/index.jsx

@@ -41,7 +41,6 @@ class AssistCheck extends React.Component {
                             assistVal={assistVal}
                             windowHeight={windowHeight}
                         >
-
                         </AddAssistCheck>
                     </div>
                 </ItemBox>