I have a modal for reminders that has a completed date, when I delete the date I get an error that the database cannot save ‘’ in a datetime field.
Everything works as expected,
I can add a reminder and the completed date will save as null if no date is ever set
I can edit a reminder and it saves fine
I can select a completed date and it will save fine.
The problem is when I change my mind and want to delete the completed date, so the reminder is no longer complete, then try to save, it gives me the database error.
Because it is a carbon instance, for some reason, I cannot check to see if it is null or empty or == ‘’
I could remove the date cast so it is not a carbon instance, however, is there a simply way to check if the completed date is empty when saving?
I know I’m missing something but, just can’t get it worked out.
Yes, I am using the latest version.