Filter Date custom filed

2 years 1 month ago #8781 by Ajeje Brazorf
How can I filter date custom field?

Please Log in or Create an account to join the conversation.

2 years 1 month ago - 2 years 1 month ago #8782 by Ajeje Brazorf
I solved it like this:
- plugins/system/jlcontentfieldsfilter/jlcontentfieldsfilter.php
line 223 add
case 'calendar':
if(!empty($v['from']) && !empty($v['to'])){
$where = '(field_id = '.$k.' AND `value` BETWEEN "'.$v['from'].' 00:00:00" AND "'.$v['to'].' 00:00:00")';
else if(!empty($v['from'])){
$where = '(field_id = '.$k.' AND `value` >= "'.$v['from'].' 00:00:00")';
else if(!empty($v['to'])){
$where = '(field_id = '.$k.' AND `value` <= "'.$v['to'].' 00:00:00")';
$where = '(field_id = '.$k.' AND value LIKE '.$db->quote('%'.$v.'%').')';

- plugins/system/jlcontentfieldsfilter/fields/jlcontentfieldsfilterfields.php
line 83 add
case 'calendar':
$options = HTMLHelper::_('select.option', 'calendar', Text::_('PLG_JLCONTENTFIELDSFILTER_FILTER_CALENDAR'));

- /modules/mod_jlcontentfieldsfilter/layouts/mod_jlcontentfieldsfilter
duplicate range.php file and rename in calendar.php
in input type date change in "date"

- modules/mod_jlcontentfieldsfilter/assets/javascript/jlcontentfilter.js
line 46
form.find('input[type="text"], input[type="date"]').val('');

- modules/mod_jlcontentfieldsfilter/assets/javascript/nojq_jlcontentfilter.js
var els = form.querySelectorAll('input[type="text"], input[type="date"]');
Last edit: 2 years 1 month ago by Ajeje Brazorf.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Last from the forum

    • JL Sitemap хвосты в url пунктов меню vm4
    • Методом проб и ошибок удалось выяснить, что данные хвосты появляются при php 8.2 На php 7.4  такой ошибки нет Кроме того на php 8.2 не цепляются товары виртуемарта, только категории.  Есть у кого какие-нибудь мысли?
    • In Component / JL Sitemap
    • Problem with Telegram, VK logins
    • Hello, I use Slogin 3.0.2 and four plugins: Google, Wordpress, Telegram and VK. All of a sudden Telegram and VK logins stopped working, recently. The process seems to go through normally, but after redirect back to the site, the user is not logged in. I do not know if this is due to any PHP changes in the server. PHP is currently at 8.1.25 and Joomla! 3.10.12 Stable.  Also the login buttons for some reason do not work from mobile phones, they do nothing. From tablet and PC they are ok. I would appreciate your help in this.
    • In Component / Slogin
© 2010- JoomLine
The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries. is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

email: This email address is being protected from spambots. You need JavaScript enabled to view it.