Month Datepicker (minViewMode: 'months') on Day View

Home Forums Calendar Products Events Calendar PRO Month Datepicker (minViewMode: 'months') on Day View

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #122987
    libertyme
    Participant

    Hi Tribe, I’ve been trying to change the datepicker in the admin bar on day views (e.g. /events/2014-03-25/) to the same datepicker used on month views (e.g. events/2014-03/). In other words, change the datepicker on day views to use minViewMode: ‘months’ instead of minViewMode: ‘days’.

    I’ve tried to figure out a way to do this in a preserved way, but the only way I’ve managed to do it is by editing tribe-events-bar.min.js directly. Do you have advice on a way to do this from within theme files?

    (If it’s useful for context, the reason we are doing this is: We have a month calendar with links to each individual day already on the day view (tribe_show_month) in addition to the month view. With the datepickers the same, navigation will be consistent in both views: the datepicker will in both cases switch the calendar’s month, with the days within the calendar serving as links to the day view.)

    Thanks,
    Kevin

    #123148
    Brook
    Participant

    Howdy Kevin!

    That’s a good question. Unfortunately the answer is that you can not do this without modifying the script. Personally I prefer to dequeue & deregister scripts like that using WP’ API, then enqueue my own custom version. This allows you to keep your plugin up to date more often, without needing changes. We do modify our tribe scripts though pretty frequently, but mostly in major updates. So if had followed the above advice while running version 3.3 of our plugins then updated  to 3.4, you would likely need to copy over our new JS file and redo your change within. That’s the unfortunate part of the answer.

    Does that make sense? Will that work for you? Please let me know. Cheers!

    – Brook

    #124908
    libertyme
    Participant

    Thanks Brook. I’ve gone the dequeue and deregister route, as you’ve suggested, and will look to update our custom enqueued script on major plugin updates. I imagine it’s too niche a request to warrant a theme setting for the datepicker’s format, but throw my hat into that ring anyway. Maybe one day it will be a worthwhile setting to implement.

    #125988
    Brook
    Participant

    For sure! At the very least if you have an idea on how we could make the modification happen through a WP hook or JS override, that would make it easier to maintain.

    Just in case you do not already know, the best place to make feature suggestions is our user voice page. We actively monitor the topics there, gauging their popularity and how feasible (or in the case of less popular recommendations, easy) they are to implement. Plus other members of the community often vote up suggestions like yours if they find it useful.

    Thanks for posting!

    – Brook

    #184662
    libertyme
    Participant

    Hi Tribe & Brook,
    I noticed that you guys implemented a datepicker format setting into 3.6. Thanks so much for doing that! Unfortunately for me, it doesn’t look like it supports yet the format we use on our site, which is ‘yyyy-mm’ with minViewMode:’months’.
    Is it possible you could add support for minViewMode:’months’ as well in the Settings page? That would be really great.
    Thanks again for adding this functionality. Below is my full datepicker_opts line in case it’s helpful for what users may want to use and what you could add support for:
    e.datepicker_opts={format:”yyyy-mm”,minViewMode:’months’,autoclose:!0}

    #186946
    Brook
    Participant

    Howdy libertyme,

    As you originally suspected this is likely too niche of a request. I have only ever seen this request once, from you! Feel free to suggest it as a feature though as outlined above. Or, if you have any idea on how we could make this sort of modification easier, request that instead. For something like this it is likely that more people would benefit from having more modifying capability than from this exact customization, as I doubt there are many besides you that will ever need this.

    Please let me know if you have questions. If not, would you mind marking this resolved? Cheers!

    – Brook

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Month Datepicker (minViewMode: 'months') on Day View’ is closed to new replies.