|
|
|
@ -3,6 +3,24 @@ import React from 'react'
|
|
|
|
|
import { Modal , Form, Input, Radio,DatePicker, TimePicker,Select,Button} from 'antd';
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
function range(start, end) {
|
|
|
|
|
const result = [];
|
|
|
|
|
for (let i = start; i < end; i++) {
|
|
|
|
|
result.push(i);
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function disabledDateTime() {
|
|
|
|
|
return {
|
|
|
|
|
disabledMinutes: () => range(1, 30).concat(range(31, 60)),
|
|
|
|
|
// disabledSeconds: () => range(0,60)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function disabledDate(current) {
|
|
|
|
|
return current && current < moment().endOf('day').subtract(1, 'days');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
|
|
|
|
|
|
|
|
|
@ -121,7 +139,10 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
|
|
|
|
|
<Form.Item label="签到日期:">
|
|
|
|
|
{getFieldDecorator('attendance_date', {
|
|
|
|
|
rules: [{ type: 'object', required: true, message: '请选择签到日期',}],
|
|
|
|
|
})(<DatePicker style={{width:"413px"}} getPopupContainer={trigger => trigger.parentNode}/>)}
|
|
|
|
|
})(<DatePicker style={{width:"413px"}} getPopupContainer={trigger => trigger.parentNode}
|
|
|
|
|
disabledTime={disabledDateTime}
|
|
|
|
|
disabledDate={disabledDate}
|
|
|
|
|
/>)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<Form.Item label="开始时间:">
|
|
|
|
|