调整时间体验

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

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

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

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

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

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

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

Loading…
Cancel
Save