Custom Fields
Joomla! version (x.y.z) | 4.2.3 |
Extension Version (x.y.z) | 1.7.1 |
Custom Fields
Joomla! version (x.y.z) | 4.2.3 |
Extension Version (x.y.z) | 1.7.1 |
Hi
It is related with the way the dates are stored.
Even if you disabled the "show time" setting in the custom field, the dates are stored as datetime (date and time).
You can check that even in the database, or in the url when you select a date in the filter
That means that each of those values are different.
Even when the date is the same their time is not.
You have to make sure that these values have both the same date and time.
To do that you can enable the "show time" setting and use something like 00:00:00 as time for all.
Kind regards,
Sakis Terzis
Founder and Lead Developer
Yes. You're right. I manually set the time for all dates to 00:00:00 and everything started working as it should.
Can you tell me how to make the default time 00:00:00 in a custom calendar field? Or tell me please where in your module the filter receives an array with date and time, I will change this array using php and leave only the date.
Hi
Can you tell me how to make the default time 00:00:00 in a custom calendar field?
I am not aware of a way to do that.
Possibly you can develop a custom php script to format your dates accordingly in your database table (#__fields_values).
Or tell me please where in your module the filter receives an array with date and time, I will change this array using php and leave only the date.
No, please don't do that.
Beyond it's complexity, you will end up with a hacked JFilters component that cannot be updated.
The 1st solution is by far better.
Kind regards,
Sakis Terzis
Founder and Lead Developer
Good. I understood you. Too bad the filter doesn't implement this by default. I will get out of the situation.
Hi
As explained is related with the way Joomla saves the dates and is unrelated to the filters and our functionality.
Kind regards,
Sakis Terzis
Founder and Lead Developer
I understand it. But to make the filter work better, you can add changes in the future version. Make please the date from the custom field Calendar that goes into the filter go without time.
You are missing some parts.
The formating of the date values (e.g. removing the time) will not make them different values.
The formatting happens in the presentation level, while the filter values are generated in the persistent level (i.e. database).
Anyway we are already looking for ways to overcome that.
As already mentioned, you can create a small php script or a plugin to make that work for you.
Kind regards,
Sakis Terzis
Founder and Lead Developer
Hi
FYI the issue is fixed in version 1.8.0 and up.
Also the latest version 1.9.0 has a calendar/date picker display type available for the calendar custom field.
I am closing the ticket as resolved.
Kind regards,
Sakis Terzis
Founder and Lead Developer