• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

passing relative date paramters to filter list

skyrun

Active Member
used to be able to do something like this:
domain.com/search?resetfilters=0&Reservations___date_time[value][]=today&Reservations___date_time[value][]=+1 Month&Reservations___date_time[condition]=BETWEEN

A 'today' and a 'tomorrow' value still work and resolve correctly, but the +1 month or +1 week etc now throw this error:

DateTime::__construct(): Failed to parse time string ( 00:00:00 month) at position 9 (m): The timezone could not be found in the database

i tried the 'advanced formats = yes'

filling in specific dates work, but of course that doens't allow the filter to be the 'next 5 days' that slide forward in the inevitable march of time.
need to be able to specify relative dates in order to have menu items that filter/show 'today' or 'next month' or 'next week' (on parameters at least) for several use-cases.
 
yes. same on both.

my modified one will convert word dates on the js side on the form itself (not the filter), so typing +1 month will work on the form, but it converts it using js to a date. that doesn't help on the filter.
 
Oh, oops, I should have seen that one right away.

Use %2B instead of the + sign. On a URL, a + means space. Always url encode, so ... &%2B1%20month or &%2B1+month

-- hugh
 
also, saw a recent update for 'always return todays date' so updated from git just in case, but still no joy.
 
If I do ...

date_test___slash_date[value][]=midnight%20yesterday
&date_test___slash_date[value[]=midnight%20yesterday%20%2B1%20months
&date_test___slash_date[condition]=BETWEEN
&fabrikdebug=1
&resetfilters=1

I get ...

WHERE ( `date_test`.`slash_date` BETWEEN '2017-03-30 05:00:00' AND '2017-05-01 04:59:59' )

... which (I think) is correct, as it is curently 7:15pm on 3/30, I'm storing as GMT, and am GMT-5.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top