Commit 43e213af by zhaochengxiang

bug fix

parent 9529bdf8
......@@ -240,7 +240,21 @@ const FC = (props) => {
<DatePicker.RangePicker
format="YYYY-MM-DD"
onChange={(values) => {
setArgsByParams({ startTime: (values??[]).length>0?values[0].valueOf():'', endTime: (values??[]).length>1?values[1].valueOf():'', page: 1 })
let startTime = '', endTime = ''
if ((values??[]).length>0) {
const currentDate = new Date(values[0].valueOf());
currentDate.setHours(0, 0, 0, 0);
startTime = currentDate.getTime();
}
if ((values??[]).length>1) {
const currentDate = new Date(values[1].valueOf());
currentDate.setHours(23, 59, 59, 0);
endTime = currentDate.getTime();
}
setArgsByParams({ startTime, endTime, page: 1 })
}}
style={{ width: 240 }}
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment