endTime should be allowed to be left blank

This commit is contained in:
2022-07-22 19:47:21 +00:00
parent 71aabb3ca6
commit 70a971c3b9

View File

@@ -44,6 +44,9 @@ const Events: CollectionConfig = {
label: 'End Time',
type: 'date',
validate: (val, { siblingData }) => {
if (!val)
return true;
const end = new Date(val).getTime();
const start = new Date(siblingData.startTime).getTime();