Calendar from to not working for me.

  • maurijkmakitalo
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0

maurijkmakitalo created the topic: Calendar from to not working for me.

Hello,

I have little problem with my CB list. I am trying to filter my list to show only forms that were filled within certain time. I am using form filled with BF and there I have date slot that saves it in format %d-%m-%Y %H:%M. Then using ContentBuilder - Advanced List Filter I tried to filter my list with @range/calendar/from-to/%d-%m-%Y and @range/calendar/from-to/%d-%m-%Y %H:%M in the date slot because was not sure if I need hours and minutes in it, but no matter which one I tried list did not show any results after choosing dates in the filter.
#237244
  • Posts: 2629
  • Karma: 92
  • Thank you received: 354

mihaela replied the topic: Calendar from to not working for me.

Hello,

ContentBuilder date filter is meant to be used with the regular "%Y-%m-%d" date format only.

That is the reason why it is not giving you proper result is both cases.

Therefore, if you wish to use the calendar filter, you must use the "%Y-%m-%d" or "%Y-%m-%d %H:%M" format. That is the best option, you can inform the user to enter the date in this format.

Regards,

Mihaela
#237458
  • maurijkmakitalo
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0

maurijkmakitalo replied the topic: Calendar from to not working for me.

Hi,

I actually worked around it using code:
$i = 0;
foreach($this->savedata as $data){
if($data[_FF_DATA_NAME] == 'paivays'){
$separated = explode(' ',$data[_FF_DATA_VALUE]); // separates date and time
$exploded = explode('-',$separated[0]); // separates day, month and year
$this->savedata[$i][_FF_DATA_VALUE] = $exploded[2].'-'.$exploded[1].'-'.$exploded[0].' '.$separated[1]; // Arranges the date to correct format for the mysql
break;
}
$i++;
}

then I used this code in the item wrap in content builder view for date to turn it back to format we are using:
<?php return $value=date('d-m-Y G:i',strtotime($value)); ?>
#237918
  • Posts: 2629
  • Karma: 92
  • Thank you received: 354

mihaela replied the topic: Calendar from to not working for me.

Hello,

Good job, you have made a smart workaround for this to work as you wanted.

Thank you for sharing this with the community.

Regards,

Mihaela
#237921
Moderators: ForumSupporttomeperica
Time to create page: 0.061 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here