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: 3128
  • Karma: 105
  • Thank you received: 413

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: 3128
  • Karma: 105
  • Thank you received: 413

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: ForumSupport
Time to create page: 0.046 seconds

We Are Doing Our Part

Massive discounts on all of our extension subscription plans to help you and your business in these times.

Get Your Subscription Here

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!

News and Updates

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

All Extensions Subscription

We are doing our part and support your business with extremely low prices -- For example 6-Months-Subscription for only $9 USD. For as long as necessary.

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!