Date format and picker in Community Submission form

Home Forums Calendar Products Community Events Date format and picker in Community Submission form

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #955305
    Tony
    Participant

    Hi,

    I cannot find the JavaScript hook that controls the date format and picker options of the start and end dates on the community submission form.

    I want the date to be formatted the same as the tribe bar filter on the main plugin (it’s a bit weird that they are different in the first place).

    On the community events form I want to use DD/MM/YYYY and I would like just a single month displayed (as the 3 month view does not work correctly on small resolutions).

    I have tried what Casey advises here – https://theeventscalendar.com/support/forums/topic/change-datepicker-format/#post-71516 – but with no success.

    Thanks,

    Tony.

    #955385
    George
    Participant

    Hey Tony,

    You’re right about this being “weird” behavior – so weird, in fact, that we actually patched this and made sure all the datepicker formats were consistent, it’s a bugfix coming in the next release which is coming very, very soon!

    While that’s good news, the bad news is that it’s actually a complex customization to make – quite a bit beyond the scope of the support forums here. Do you think you could wait a month plus or minus a few weeks for a new update? Or is this extremely urgent/important?

    — George

    #955389
    Tony
    Participant

    Hi George,

    Unfortunately this is needed for a site going live within the next 2 weeks (for a town council – so they’ll be picky and want UK dates).

    Does the patch also include styling the date picker popup the same way? And how do I limit it to one month on the community submission form (like the tribe bar filter)?

    Sorry for multiple questions in one thread, but it feels like they are probably related.

    #955407
    George
    Participant

    Hey Tony,

    When you mention “styling the date picker popup”, can you clarify this a bit more?

    To limit the datepicker to one month, or to adjust the date format ahead of time before our update is released, you will unfortunately have to set the following code in your wp-config.php file:

    define( 'SCRIPT_DEBUG', true );

    And then head to events-admin.js in The Events Calendar core plugin – not Community Events itself – and modify the options for the datepicker() functions. These datepicker() calls use the jQuery UI datepicker, so to limit months or change formats, you can use the options described in the jQuery UI Datepicker documentation here → http://api.jqueryui.com/datepicker/

    #955417
    Tony
    Participant

    Hi George,

    Thanks for that, I’ll dig into the JS. It’s a bit of a pain as I think having three months breaks the responsiveness of the page and should actually be considered a bug – have you tried using it on a small screen?

    With regards to “styling the date picker popup”…

    The filter bar calendar pop-up looks like this – http://screencast.com/t/IdDNbz2TJnQ

    The community submission form looks like this – http://screencast.com/t/oqSeBcefO

    I’d like them to look the same.

    #955784
    George
    Participant

    Hey Tony,

    You’re indeed right about having better responsiveness for the datepicker, and it actually was something we fixed for the new release! 🙂 I personally handled that bug, in fact. Funny you mention it!

    There’s something else we need to improve, however, which makes making the style customization you mention quite hard – the front-end datepickers in the filter bar and such use a different datepicker library, the Bootstrap datepicker, while the admin-facing datepickers (which the community events submission pages technically are in the eyes of our code currently, though this could be improved for sure) use the standard jQuery UI datepickers.

    So to have these things look exactly the same, you’d have to either re-wire the admin and Community datepickers to the Bootstrap datepicker, or just copy the CSS for the Bootstrap datepicker and apply it to the jQuery UI datepicker. All the relevant JavaScript and CSS for these tasks are in the /resources folder of The Events Calendar core, not the Community add-on – the add-on just uses the Core scripts, as PRO or the Ticketing add-ons or any other add-on would do.

    Sorry for the disappointment on this fact Tony. Let me know what your thoughts are and/or if you have any other questions or concerns.

    Cheers!
    George

    #984024
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Date format and picker in Community Submission form’ is closed to new replies.