mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 22:47:15 +01:00
replace momentjs (incl. calendar)
This commit is contained in:
committed by
Thomas Ruoff
parent
7f4604f0e6
commit
02c2b45747
@@ -65,7 +65,10 @@ const BookingSchema = new mongoose.Schema<BookingDocument>(
|
||||
)
|
||||
|
||||
BookingSchema.virtual('days').get(function () {
|
||||
return getDays({ startDate: this.startDate, endDate: this.endDate })
|
||||
return getDays({
|
||||
startDate: new Date(this.startDate),
|
||||
endDate: new Date(this.endDate),
|
||||
})
|
||||
})
|
||||
|
||||
BookingSchema.static('findBookedDays', async function (): Promise<string[]> {
|
||||
|
||||
Reference in New Issue
Block a user