I have an issue where my new element is saving with the current date and time. I won't want it to save with any kind of date/timestamp. Does craft just automatically put in the current date and time when a date field is empty? I don't think I had this issue before, but maybe I just never noticed it.

When I started to notice it I made these changes, but I don't see why they'd affect anything.

The only changes that I can think of is I made it so I could edit the time if needed in the CMS panel and added $employee->dateVoucherUsed = $request->getBodyParam('dateVoucherUsed'); to the actionSave() function of the EmployeeController

I commented out the request above and the timestamp is still saving with the current time.

My install.php file has this 'dateVoucherUsed' => $this->dateTime(),

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.