endTime should be allowed to be left blank
This commit is contained in:
@@ -44,6 +44,9 @@ const Events: CollectionConfig = {
|
|||||||
label: 'End Time',
|
label: 'End Time',
|
||||||
type: 'date',
|
type: 'date',
|
||||||
validate: (val, { siblingData }) => {
|
validate: (val, { siblingData }) => {
|
||||||
|
if (!val)
|
||||||
|
return true;
|
||||||
|
|
||||||
const end = new Date(val).getTime();
|
const end = new Date(val).getTime();
|
||||||
const start = new Date(siblingData.startTime).getTime();
|
const start = new Date(siblingData.startTime).getTime();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user