lbell / pretty-google-calendar

Simple WordPress plugin to embed Google Calendars in way that doesn't suck.
11 stars 7 forks source link

How to eliminate past dates from showing in list view #48

Open Cpointcc opened 4 months ago

Cpointcc commented 4 months ago

I was instructed to add a wishlist item to this plugin to eliminate past dates from showing in the list view. They are greyed out, however it still shows and is confusing to the viewer.

the response from the developer @lbell was:

This could be done via the validRange argument (https://fullcalendar.io/docs/validRange) argument in FullCalender. If you want to add that directly to the code it should work (you’d be looking for pgcalDefaults on line 56 of pgcal.js).

Note: this will get overwritten with any plugin updates. (This is not ideal moving forward as having to remember this process is a maintenance issue.)

If you’d like to see this feature added, please submit a ticket here: https://github.com/lbell/pretty-google-calendar/issues

Please consider adding this feature ASAP. Your effort is greatly appreciated.

lbell commented 4 months ago

Could add shortcode arg to implement the following:

validRange: {
    start: new Date().toISOString().split('T')[0],
},

Don't think we can use fc_args since we'd need to parse the current date.

Cpointcc commented 4 months ago

Hello,

Will this still get overwritten upon updating plugin?

Please advise.

lbell commented 4 months ago

Howdy! @Cpointcc, if you add that code directly into pgcal.js, then yes, it will get overwritten when the plugin is updated.

Cpointcc commented 4 months ago

OK. What are the odds this will be added via the wishlist and an eta? It's a great plugin. This I believe is something all users would want to see.