调整时间体验

PCqiandao
杨树明 5 years ago
parent 25a9ea8b51
commit b920733095

@ -120,32 +120,32 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
}); });
} }
getDisabledHours=()=> { // getDisabledHours=()=> {
let hours = [] // let hours = []
if(this.state.dateString===moment().format('YYYY-MM-DD')){ // if(this.state.dateString===moment().format('YYYY-MM-DD')){
let time = moment().format('HH:mm') // let time = moment().format('HH:mm')
let timeArr = time.split(':') // let timeArr = time.split(':')
for (var i = 0; i < parseInt(timeArr[0]); i++) { // for (var i = 0; i < parseInt(timeArr[0]); i++) {
hours.push(i) // hours.push(i)
} // }
} // }
//
return hours // return hours
} // }
//
getDisabledMinutes=(selectedHour)=>{ // getDisabledMinutes=(selectedHour)=>{
let minutes = [] // let minutes = []
if(this.state.dateString===moment().format('YYYY-MM-DD')){ // if(this.state.dateString===moment().format('YYYY-MM-DD')){
let time = moment().format('HH:mm') // let time = moment().format('HH:mm')
let timeArr = time.split(':') // let timeArr = time.split(':')
if (selectedHour == parseInt(timeArr[0])) { // if (selectedHour == parseInt(timeArr[0])) {
for(var i = 0; i < parseInt(timeArr[1]); i++) { // for(var i = 0; i < parseInt(timeArr[1]); i++) {
minutes.push(i) // minutes.push(i)
} // }
} // }
} // }
return minutes // return minutes
} // }
onChange=(date, dateString)=>{ onChange=(date, dateString)=>{
this.setState({ this.setState({
@ -166,14 +166,14 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"border":"1px solid rgba(76,172,255,1)", "border":"1px solid rgba(76,172,255,1)",
"border-radius":"4px", "borderRadius":"4px",
} }
const rightbuton={ const rightbuton={
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"background":"#4CACFF", "background":"#4CACFF",
"border-radius":"4px", "borderRadius":"4px",
} }
const format = 'HH:mm'; const format = 'HH:mm';
@ -200,7 +200,7 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
{course_groups.map((item,key)=>{ {course_groups.map((item,key)=>{
return( return(
<Option value={item.id}>{item.name}</Option> <Option value={item.id} key={key}>{item.name}</Option>
) )
})} })}
@ -242,7 +242,7 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
})(<DatePicker style={{width:"413px"}} getPopupContainer={trigger => trigger.parentNode} })(<DatePicker style={{width:"413px"}} getPopupContainer={trigger => trigger.parentNode}
disabledTime={disabledDateTime} disabledTime={disabledDateTime}
disabledDate={disabledDate} disabledDate={disabledDate}
onChange={this.onChange}
/>)} />)}
</Form.Item> </Form.Item>
<style> <style>
@ -295,7 +295,8 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
showTimeSelect showTimeSelect
showTimeSelectOnly showTimeSelectOnly
timeIntervals={1} timeIntervals={1}
minTime={new Date()} minTime={this.state.dateString===moment().format('YYYY-MM-DD')||this.state.dateString===null?new Date():false}
maxTime={this.state.dateString===moment().format('YYYY-MM-DD')||this.state.dateString===null?moment().endOf('day').toDate():false}
timeCaption="Time" timeCaption="Time"
timeFormat="HH:mm" timeFormat="HH:mm"
getPopupContainer={trigger => trigger.parentNode} getPopupContainer={trigger => trigger.parentNode}

@ -12,14 +12,14 @@ class Qrcodesignin extends Component {
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"border":"1px solid rgba(76,172,255,1)", "border":"1px solid rgba(76,172,255,1)",
"border-radius":"4px", "borderRadius":"4px",
} }
const rightbuton={ const rightbuton={
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"background":"#4CACFF", "background":"#4CACFF",
"border-radius":"4px", "borderRadius":"4px",
} }
return( return(
<React.Fragment> <React.Fragment>

@ -46,14 +46,14 @@ class Signinname extends Component {
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"border":"1px solid rgba(76,172,255,1)", "border":"1px solid rgba(76,172,255,1)",
"border-radius":"4px", "borderRadius":"4px",
} }
const rightbuton={ const rightbuton={
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"background":"#4CACFF", "background":"#4CACFF",
"border-radius":"4px", "borderRadius":"4px",
} }
return( return(
<React.Fragment> <React.Fragment>

@ -48,14 +48,14 @@ class Studentssignmodel extends Component {
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"border":"1px solid rgba(76,172,255,1)", "border":"1px solid rgba(76,172,255,1)",
"border-radius":"4px", "borderRadius":"4px",
} }
const rightbuton={ const rightbuton={
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"background":"#4CACFF", "background":"#4CACFF",
"border-radius":"4px", "borderRadius":"4px",
} }
return( return(
<React.Fragment> <React.Fragment>

@ -386,7 +386,7 @@ class Trialapplication extends Component {
{ {
isRenders === false ? "" : isRenders === false ? "" :
<div style={{"border-radius": "10px"}}> <div style={{"borderRadius": "10px"}}>
<style> <style>
{ {
` `
@ -545,14 +545,14 @@ class Trialapplication extends Component {
<Dialog open={true} id="DialogIDysl" <Dialog open={true} id="DialogIDysl"
disableEscapeKeyDown={true} disableEscapeKeyDown={true}
style={{display: isRenders == false ? 'none' : '', "border-radius": "10px"}} style={{display: isRenders == false ? 'none' : '', "borderRadius": "10px"}}
> >
<div id="closeIcon" onClick={() => { <div id="closeIcon" onClick={() => {
this.handleDialogClose() this.handleDialogClose()
}}> }}>
<i className="iconfont icon-shanchudiao"></i> <i className="iconfont icon-shanchudiao"></i>
</div> </div>
<div className={"login_register_content"} style={{"border-radius": "10px", "width": "560px"}}> <div className={"login_register_content"} style={{"borderRadius": "10px", "width": "560px"}}>
<div className={"login_register_content"} style={ <div className={"login_register_content"} style={
user_phone_binded === true ? user_phone_binded === true ?

@ -404,7 +404,7 @@ class Trialapplicationysl extends Component {
{ {
isRenders === false ? "" : isRenders === false ? "" :
<div style={{"border-radius": "10px"}}> <div style={{"borderRadius": "10px"}}>
<style> <style>
{ {
` `
@ -563,14 +563,14 @@ class Trialapplicationysl extends Component {
<Dialog open={true} id="DialogIDysl" <Dialog open={true} id="DialogIDysl"
disableEscapeKeyDown={true} disableEscapeKeyDown={true}
style={{display: isRenders == false ? 'none' : '', "border-radius": "10px"}} style={{display: isRenders == false ? 'none' : '', "borderRadius": "10px"}}
> >
<div id="closeIcon" onClick={() => { <div id="closeIcon" onClick={() => {
this.handleDialogClose() this.handleDialogClose()
}}> }}>
<i className="iconfont icon-shanchudiao"></i> <i className="iconfont icon-shanchudiao"></i>
</div> </div>
<div className={"login_register_content"} style={{"border-radius": "10px", "width": "560px"}}> <div className={"login_register_content"} style={{"borderRadius": "10px", "width": "560px"}}>
<div className={"login_register_content"} style={ <div className={"login_register_content"} style={
user_phone_binded === true ? user_phone_binded === true ?

Loading…
Cancel
Save