Modifying the Date picker/Filter bar

Home Forums Calendar Products Community Events Modifying the Date picker/Filter bar

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1178411
    Derek
    Participant

    Hello,

    I am hosting an event to takes place from April 1st-8th. I’d like to modify the date picker on the edit-event form to only show April 1st-8th and no other dates. Is this possible? If so, whats the best way to achieve this.

    Also, Id like to filter the Day filter on the Filter Bar to show April 1st – 8th instead of the M-SN. What’s the best way to achieve this?

    Thank you for you time,
    Derek

    #1179018
    Cliff
    Member

    Hi Derek.

    You could reference https://theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form/ to possibly be able to restrict Community Events form submissions to only allow certain dates.

    Of course, it wouldn’t be great for users if they didn’t know your date restrictions, which is why you’d want a customized date picker.

    I’d probably start by setting the start/end date fields to a default date, like 2017-04-01, and then consider hiding actual datepicker dates or full months. You could also inject some help text around the date field(s) to specify the only dates that will be allowed are April 1-8, 2017.

    Please let me know if you have any follow-up questions on this topic.

    #1180613
    Derek
    Participant

    Thanks Cliff.

    Would I set the default start/end dates in the tribe_community_events_get_start_date in template-tags.php?

    Derek

    #1180851
    Cliff
    Member

    Derek, yes, good find. Here’s an example for you:

    https://gist.github.com/cliffordp/6a823bbe3aaa266c7f4f5b93e89d1424

    #1180882
    Derek
    Participant

    Thanks Cliff! I just wanted to make sure I was editing in the right place. That worked.

    Also, the events calendar uses bootstrap-datepicker.js, correct?

    I’d like to customize the date picker so it only allows the user to choose a specific date range.

    I know bootstrap-datepicker.js allows you to do this using their startDate and endDate options. Do you have any advice on how to go about executing this with community events? Also, does the date search bar and the community edit-event page use different date pickers?

    Thanks for your help!!!!
    Derek

    • This reply was modified 7 years, 6 months ago by Derek.
    • This reply was modified 7 years, 6 months ago by Derek.
    #1180903
    Cliff
    Member

    I’m glad that helped you.

    The datepicker used in Community Events comes from /wp-content/plugins/the-events-calendar/vendor/bootstrap-datepicker

    Feel free to share any customizations you come up with if you think it’ll help others.

    If you need some coding help, you may want to ask your developer or reference our documentation and list of known customizers.

    #1191387
    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 ‘Modifying the Date picker/Filter bar’ is closed to new replies.