Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

Allow legacy polls to change dates

Luke Vellaa049ec79c67e
diff --git a/components/poll/manage-poll.tsx b/components/poll/manage-poll.tsx
index f67321811..2b425460f 100644
--- a/components/poll/manage-poll.tsx
+++ b/components/poll/manage-poll.tsx
@@ -56,7 +56,11 @@ const ManagePoll: React.VoidFunctionComponent<{
}
: {
type: "date",
- date: start,
+ date:
+ start.indexOf("T") === -1
+ ? start
+ : // legacy polls
+ new Date(start).toISOString().substring(0, 10),
};
}),
timeZone: poll.timeZone ?? "",