mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(bug) pre registration end date dont set empty if pre registration is false
This commit is contained in:
parent
f2e7cd0fdc
commit
801ca4f8b2
@ -103,7 +103,7 @@ export const EventForm: React.FC<EventFormProps> = ({ action, event, onError, on
|
||||
const onSubmit: SubmitHandler<Event> = (data: Event) => {
|
||||
setSubmitting(true);
|
||||
if (submitting) return;
|
||||
if (data.pre_registration_end_date?.toString() === 'Invalid Date') {
|
||||
if (data.pre_registration_end_date?.toString() === 'Invalid Date' || !data.pre_registration) {
|
||||
data.pre_registration_end_date = null;
|
||||
}
|
||||
if (action === 'update') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user