I would like to subtract 7 days from current date to get formatted date YYYY-MM-DD using moment.js library.
I tried to do by this way:
for a date picker y use
first_day: moment() .subtract(5, "day") .endOf("day") .toDate(), last_day: moment() .endOf("day") .toDate(),