修改日期選擇
This commit is contained in:
parent
b17952ed2c
commit
e4fe1cd334
@ -326,9 +326,9 @@
|
||||
$('#his_startdate').val(date);
|
||||
|
||||
if (type == "today")
|
||||
getData(formatDate(now, "date", true), formatDate(tmr, "date", true));
|
||||
getData(formatDate(now, "date", true), formatDate(now, "date", true));
|
||||
else if (type == "ytd")
|
||||
getData(formatDate(ytd, "date", true), formatDate(now, "date", true));
|
||||
getData(formatDate(ytd, "date", true), formatDate(ytd, "date", true));
|
||||
else {
|
||||
$(`[onclick="setDateType('today', this)"]`).removeClass('btn-secondary');
|
||||
$(`[onclick="setDateType('today', this)"]`).addClass('btn-info');
|
||||
@ -367,8 +367,8 @@
|
||||
let start = new Date($('#his_startdate').val());
|
||||
let end = new Date($('#his_enddate input').val());
|
||||
|
||||
if (pageAct.dateType == "today" || pageAct.dateType == "day" || pageAct.dateType == "ytd")
|
||||
end = start;
|
||||
if (pageAct.dateType == "today" || pageAct.dateType == "day" || pageAct.dateType == "ytd")
|
||||
end = start;
|
||||
else if (pageAct.dateType == "month") {
|
||||
start = new Date($('#getmonth').val());
|
||||
end = new Date(start.valueOf()).setMonth(start.getMonth() + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user