• Resolved wegnertm

    (@wegnertm)


    I’d like the Previous/Next to display just the previous and next short text for months. Right now if I use {date} it’ll display Full Month, Year

    Example: November, 2022 | January, 2023

    I’d like it to be Nov | Jan

    I tried doing {date format=”M”} but didn’t have luck with that. I have full access to my backend so I could maybe add a function/hook but wondering if there’s a better way to do this.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    This is filterable using the filters mc_month_year_format and mc_month_format. The month/year format is used whenever the next month is navigating to a different year (e.g. next when it’s December and previous when it’s January); the month format is used in other months.

    See https://joedolson.github.io/my-calendar/mc_month_format.html and https://joedolson.github.io/my-calendar/mc_month_year_format.html

    Thread Starter wegnertm

    (@wegnertm)

    @joedolson thank you for the reply but unfortunately my previous/next buttons are not doing that. If I go to Oct 2022 it shows September, 2022 and November, 2022. Same if I go forward to March 2023 it shows February, 2023 and April, 2023

    Plugin Author Joe Dolson

    (@joedolson)

    So, if you add a filter to mc_month_format, returning just the month, it still shows both?

    Thread Starter wegnertm

    (@wegnertm)

    I thought you were saying that the calendar should be doing this already because it’s using the mc_month_format filter? I pushed a calendar to a live site so you can view it here: Click on the “December Extended Hours” button on the right side of the form on https://nest529.com/contact-us/

    Do I need to add the mc_month_format filter in my functions.php file in my theme?

    Plugin Author Joe Dolson

    (@joedolson)

    No, I mean that you can use that filter to pass any date format you want into the label; but on looking into this, I did note that I had a copy-paste error in that both filters were defaulting to the same fallback values. That’s fixed for the next release.

    Thread Starter wegnertm

    (@wegnertm)

    @joedolson what do I need to put in the Settings for just the month to appear and not the year because I updated the plugin but it’s still displaying the year in the Next/Previous buttons and I only want the month there unless the user is in December/January.

    • This reply was modified 2 years, 2 months ago by wegnertm.
    Plugin Author Joe Dolson

    (@joedolson)

    If you can wait for the next release, this will be resolved there.

    Thread Starter wegnertm

    (@wegnertm)

    @joedolson sounds good, thanks!

    Plugin Author Joe Dolson

    (@joedolson)

    this should be fixed in the latest releases.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Change date in Previous/Next’ is closed to new replies.