1
0
Fork 0
mirror of https://github.com/lukevella/rallly.git synced 2025-08-13 09:16:53 +02:00

Fix date removal

This commit is contained in:
Luke Vella 2022-07-05 00:29:51 -07:00
commit a1d86dbb4b

View file

@ -133,10 +133,10 @@ export const removeAllOptionsForDay = (
date: Date, date: Date,
) => { ) => {
return options.filter((option) => { return options.filter((option) => {
const optionDate = new Date( return !dayjs(date).isSame(
option.type === "date" ? option.date : option.start, option.type === "date" ? option.date : option.start,
"day",
); );
return !dayjs(date).isSame(optionDate, "day");
}); });
}; };