No, got this now:
Error in render: "TypeError: dayjs__WEBPACK_IMPORTED_MODULE_0___default(...)(...).isAfter(...).format is not a function"
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I'm trying to format my date into DD/MM/YYYY and run .isAfter method as well, but I always get this error message:
Error in render: "TypeError: dayjs__WEBPACK_IMPORTED_MODULE_0___default(...)(...).format(...).isAfter is not a function"
I can't figure out how to format the date and run this method without crashing. I have tried DayJS Custom Parse Format but could not get it to work.
Here is what I'm at right now:
isAfter(date) {
let tempYear = dayjs().get('year');
let tempDate = dayjs().date(date).month(11).year(tempYear);
return dayjs(tempDate).format('DD/MM/YYYY').isAfter(this.today);
}
So why do you need format all? It is just an if test
dayjs(tempDate).isAfter(this.today);
Please or to participate in this conversation.