I have a date column (Date Time only) Display format for the column is standard
I tried the below
var te = new Date(ctx.CurrentItem.Due_x0020_Date); I get this output : Fri Mar 12 2021 00:00:00 GMT+1100 (Australian Eastern Daylight Time)
but the listview date column is showing 3/12/2021
The month is showing as date and not sure why.
Also when try deducting a year like this
te.setFullYear(te.getFullYear() - 1); console.log(te.toLocaleDateString());
I get 3/12/2020 which is correct but with date like this 30/06/2022 i get error invalid date. Is it because the date has a double digit?
Thanks in advance