Filter Date custom filed

2 years 6 months 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 6 months ago - 2 years 6 months 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 6 months ago by Ajeje Brazorf.

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

Powered by Kunena Forum

Last from the forum

    • Slogin bypass joomla account creation
    • In today's fast-paced world, taking a break from work or responsibilities to engage in a brief, enjoyable activity like Wordle can have significant mental health benefits. It offers a moment of respite from stressors , allowing players to recharge and return to their tasks with renewed focus and energy. Incorporating these small mental breaks into daily routines can contribute to overall well-being and productivity.
    • In Component / Slogin
    • Manie Musicale 2024 Song List
    • For travelers who frequently access public Wi-Fi networks while on the road, VPNs provide peace of mind by securing their internet connection and protecting their sensitive information from prying eyes. Whether you're checking emails at a coffee shop, booking flights from an airport lounge , or conducting online banking from a hotel room, using a VPN ensures that your data remains safe and secure, even on unsecured Wi-Fi networks. This allows you to stay connected and productive while minimizing the risk of cyber threats and privacy breaches during your travels.
    • In Plugins Joomline / Other plugin
    • Calendrier Cataractes 2023-2024
    • Pairing caviar with complementary foods and beverages can enhance the overall dining experience. Champagne or vodka are classic accompaniments to caviar, as their effervescence and clean flavors provide a refreshing contrast to the richness of the roe . Additionally, caviar pairs well with creamy textures like crème fraîche or sour cream, as well as with mild-flavored foods such as blinis, potatoes, or eggs, allowing the delicate flavor of the caviar to shine.
    • In English Forum / Component
© 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.