• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Default date element time to 00:00:00

jo-ka

Member
Hello.

I understand that the element Date is in fact a datetime database field. When using the date element to select a date, even if I have no time selection, the date value always returns the time with the current time.

Is there a way to set an element property to always have the time like 00:00:00?

I'll need this because I need to filter the fields based on dates and sometimes the results are incorrect because of this time.

A solution could be manually set the database field type to date, but every time we make a change to the date element, the database field is automatically updated to datetime again.



Any suggestion?

Thanks in advance.
 
Did you try with
default (eval) = return date('Y-m-d 00:00:00');
and Time selector =off
This should store all dates with time 00:00:00

Maybe you have to set Date format = local time, too.
I didn't test which date is stored if you are storing the date e.g. at 1am (where UTC is still one day behind).
 
Dear Troester,
The date was already set up to Local time.

Your approach is OK, and probably I'll need to set it like this.
I would prefer not to have a predefined date, but if this is the only option, I can live with it.

Thanks.
 
You don't need a default (I thought you wanted one).
Set time selector off (and no time format for forms).
 
hmmm, and it's still showing times <> 00:00 in new records?
I assume in existing records it may be necessary to set the time to 00:00 manually (e.g. phpmyadmin)
 
I can't replicate.
On my site it doesn't show any time before or after clicking into the date field (with form date format = d-m-Y)
(and saving an existing record which had a time set before the time is set to 00:00 after save).

Did you clear Joomla and browser cache?
Which exact Joomla and Fabrik?
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top