Fabrik 3.10 update has disabled date element time formatting

p38

Active Member
After an update, I noticed all my datetime formats in the details view has now changed, and it only shows the date.

Often I use the datetime element to get a timestamp, which is shown in the details form.

There are instances, esp for the details view, whereby one wants to format the time portion, yet NOT use the timepicker.

This seems illogical to me why this was taken out.? Now, after 10 years of fabrik site building, this means every site I have done needs to be changed when updated.

Would anyone know of the logical reason why the formatting placeholders were disabled for the time portion?

Anyone have any ideas how I can get around this issue? I dont want to use the time picker, yet I need to format the time in teh details view, esp for printing etc.

Paul
 

Attachments

  • datetimepickissue.png
    datetimepickissue.png
    15.2 KB · Views: 106
Has anyone perhaps got feedback on this?

line 2827 of the date element plugin is the culprit.

private function getFormFormat()
{
$params = $this->getParams();
$format = $params->get('date_form_format', 'Y-m-d');

// attempt to strip a few of the more common time formats
===>> $format = preg_replace('/\s+(H:i:s|H:i|g:i:s A|g:i A|g:i:s a|g:i a)$/', '', $format);

return $format;
}
 
Thanks. I have about 20 different sites all using the date element, so at this stage, it will be a major upgrade to convert everything, and I would not know the implications.

At this stage, we modified the code as indicated above, but would prefer not having to do this. I would submit a PR, but that is a dead end street, if you look at the list of PR's

It seems more and more that Media A team are not focused on this, so we have forked our own version and maintaining it currently for our needs.

We have built a few new plugins (eg: checkbox treeviews) and have offered it to Hugh and co in the past to include, but not even a courtesy reply, so now we don't even bother any more.

PS: We have been using Fabrik for over 10 years, and it has done us well, just a pity the support has waned after Rob left.

Regards

Paul
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top