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