Calendar view week with two months

By: Bob Webb | Asked: 10/29/2024
ForumsCategory: General questionsCalendar view week with two months
Bob Webb asked 2 months ago
Good Morning (it is here),   I've hit an issue that support have said is what it is (that's not a criticism of them) I have a calendar view that works exactly as expected except e.g. This week (28th Oct to 3rd Nov) my October view does not show events on 1st Nov although my November view does show events on 31st Oct. I'd like my October view to show events for the whole week Any Ideas? TIA
Attachments
2 Answers
Victor Font answered 2 months ago

I don't know why it couldn't be done with some custom code executed in the frm_view_order hook. That's the only hook in Formidable where you can modify any view query before the data is displayed. I don't know this for certain without testing the code, but I suspect that Formidable must be doing a query that looks for all data within a month. We would need to calculate the day of the week the last day of the month falls on, then figure out wht Friday's date is if is after the EOM and adjust the query's end date accordingly. It might take a developer a day to code, test, and document a project like this. There may be other ways to do this, but this is the way I would tackle it.

Victor Font replied 2 months ago

Here's a PHP snippet that calculates the last Friday of the month: https://gist.github.com/vfontjr/0bb9b4c93adf8aa92922297e92f153b7

Bob Webb answered 2 months ago
Thanks Victor I'll take a look.

It's extra annoying that it will show anything from the previous month so it's actively adding an end of month when gathering the info.
Victor Font replied 2 months ago

Commercial software developers can never anticipate every user's needs. They release code that provides a baseline functionality. Extending that functionality for a specific requirement is up to the user.

Bob Webb replied 2 months ago

I understand but a choice was made to exclude events in future months and include events in previous months - I would have expected, at least, conformity.

Victor Font replied 2 months ago

Well, that's something you'll need to take up with Strategy 11. As community volunteers, we have no input into the decisions made by the developers. You can open a ticket with them and make a feature request.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right