Date picker – Month View in Filter bar

Home Forums Calendar Products Events Calendar PRO Date picker – Month View in Filter bar

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1234723
    Olivier
    Participant

    Hello,

    We have an issue with the datepicker in the filter bar in Month View

    Per example: When we click on the month, the datepicker show, if I click on July the month because a date “2017-07”, my customer is not happy about it and he wants Month name format, “July” instead of 2017-07
    How and where can I modify that ?

    #1235177
    Barry
    Member

    Hi Olivier,

    We have a Datepicker Date Format setting for just this reason!

    You can find it within the Events → Settings → Display admin screen: however, it only supports numeric formats at this time so what you’re asking for isn’t possible at this time (unless you write custom code to accomplish it).

    It could definitely make for a great feature request though — there may even be a suitable existing request you can up-vote — over on our UserVoice page.

    Thanks!

    #1235794
    Olivier
    Participant

    Hello Barry,

    I really don’t mind to write custom code, if you could just tell me where is this part of the code and what function, I will make change on my side

    Thank you

    #1236256
    Barry
    Member

    Hi again Olivier,

    It’s not necessarily a simple change to make, because we have existing code in place that uses different date formats according to whether a regular view or month view is in use — and some care would be needed to avoid collisions with that.

    So long as you stick to the formats supported by the Bootstrap Datepicker component, though, you could override the defaults by utilizing the tribe_get_option filter hook:

    function modify_date_picker_format( $value, $name ) {
        if ( 'datepickerFormat' !== $name ) {
            return $value;
        }
    
        return "YOUR_CUSTOM_FORMAT";
    }
    
    add_filter( 'tribe_get_option', 'modify_date_picker_format', 10, 2 );
    

    The above outlines one possible strategy, but again this is an advanced customization and I’m afraid we have to leave you to largely chart your own route, here.

    Good luck!

    #1236352
    Olivier
    Participant

    Hello Barry,

    I tried to modify the function but $value doesn’t return anything, or actually “0”. I think there is a easier way on my side by calling a Jquery function once someone click on the Calendar, so I can modify the date “2017-07” by July. Could you give me the Event name for that so I can add a Jquery function once it called

    Let me know
    Olivier

    #1238664
    Barry
    Member

    Hi Olivier!

    I’m guessing you’re primarily interested in the events that fire after ajax navigation completes. If so, ajax-success.tribe is probably what you’re looking for.

    #1252391
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Date picker – Month View in Filter bar’ is closed to new replies.