Fix date removal #217

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

View file

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