Home › Forums › Calendar Products › Events Calendar PRO › Date picker – Month View in Filter bar
- This topic has 7 replies, 4 voices, and was last updated 9 years, 2 months ago by
Olivier.
-
AuthorPosts
-
February 14, 2017 at 10:28 am #1234723
Olivier
ParticipantHello,
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 ?February 15, 2017 at 6:40 am #1235177Barry
MemberHi 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!
February 15, 2017 at 9:57 am #1235794Olivier
ParticipantHello 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
February 15, 2017 at 12:54 pm #1236256Barry
MemberHi 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!
February 15, 2017 at 1:18 pm #1236352Olivier
ParticipantHello 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
OlivierFebruary 16, 2017 at 8:29 am #1238664Barry
MemberHi 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.
March 10, 2017 at 8:35 am #1252391Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Date picker – Month View in Filter bar’ is closed to new replies.
