fix(frontend): fix is last month for empty form date

This commit is contained in:
Moriz Wahl 2023-02-10 12:58:30 +01:00
parent 0fa61c67eb
commit 64930cfb3f

View File

@ -188,6 +188,7 @@ export default {
return new Date(date.setMonth(date.getMonth() - 1, 1)) return new Date(date.setMonth(date.getMonth() - 1, 1))
}, },
isThisMonth() { isThisMonth() {
if (!this.form.date) return false
const formDate = new Date(this.form.date) const formDate = new Date(this.form.date)
return ( return (
formDate.getFullYear() === this.maximalDate.getFullYear() && formDate.getFullYear() === this.maximalDate.getFullYear() &&