date functions use client browser for date parts

date functions use client browser for date parts.  just parse it instead
This commit is contained in:
CarlNation 2024-12-11 13:41:36 -05:00
parent 96bde9eb40
commit a431a58fd5

View file

@ -2100,15 +2100,10 @@ export const actions = {
) { ) {
const order = context.state.order; const order = context.state.order;
var dt = new Date(referralDate); var dtParts = referralDate.split("-");
var month = "" + (dt.getMonth() + 1); const year = dtParts[0];
var day = "" + dt.getDate(); const month = dtParts[1];
const year = dt.getFullYear(); const day = dtParts[2].substring(0, 2);
if (month.length < 2)
month = "0" + month;
if (day.length < 2)
day = "0" + day;
const loadDate = `${year}-${month}-${day}`; const loadDate = `${year}-${month}-${day}`;