WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Error:"Dates must have correct formatting. Please use the date picker (17 posts)

  1. radi_v
    Member
    Posted 1 year ago #

    Hi everyone,

    I have set up 2 pages
    one uses the short code [event_form] (add event)
    the other I set up from the settings -> pages -> other pages -> Edit events page. (my events)

    When I add an event from the "add event" page there will be no troubles and everything works just fine.

    But if I try to edit an event from "my events" page it would say "You have successfully submitted your event, which will be published pending approval." and not change the date. It would change everything else but the date.

    If I try to "add new" event from "my events" page no mater what date format I give in the textfield it would always say "Dates must have correct formatting. Please use the date picker provided."

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year ago #

    do you have a sample link for us to see; also, have you tried to temporarily:

    - deactivating all other plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).
    - switching to the default theme to rule out any theme-specific problems

  3. radi_v
    Member
    Posted 1 year ago #

    I did all that but still no luck...

    When I edit an event it will accept the data that I enter but will not store the date. That is making me think that somewhere the code is either just not trying to set the new date or is storing the date that is already in the DB. Maybe the edit-form is not sending a date string at all and the script accepts it by just not making any changes...

    When you try do add a new one it will not accept any date format, so I am thinking that maybe the script is not sending an empty string to the DB.

  4. radi_v
    Member
    Posted 1 year ago #

    Also when you are in edit mode all fields a pre-filled, but the start and end date...

  5. agelonwl
    Member
    Posted 1 year ago #

    I tried it and all works fine using latest dev version; it can either be your theme or other plugins causing the issue; also, try to see your browser error console for any javascript error or turn-on WP_DEBUG to see if there's any other error or see your php logs.

  6. radi_v
    Member
    Posted 1 year ago #

    Is the latest dev version that you are using the one available for download? Can I see your test site?

  7. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    http://demo.wp-events-plugin.com/events/ see the search, it works.

  8. radi_v
    Member
    Posted 1 year ago #

    That is a great demo, but it does not show the page that lets guesses of the site to add/edit events. That is the section that I am saying that is broken...

  9. agelonwl
    Member
    Posted 1 year ago #

    Is this using Front-end management pages? tried it and seems to be working fine? do you have a sample screenshot?

  10. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    will be adding alink to that on the menu shortly but it's already there - http://demo.wp-events-plugin.com/submit-your-event

  11. radi_v
    Member
    Posted 1 year ago #

    OK so this link looks like the regular add event form that you get by adding this [event_form] short code to your page.

    What I need to to is allow my register users to upload events and edit them if they need to.
    the [event_form] does not give you the option to edit any events on the front-end.

    However, if you set up a page in Events>Settings>Pages>Other Pages>Edit events page you should be able to add/edit events if you are logged in. The problem is that this section of the plugin does not work. It does not let me to add new events because of incorrect date format.
    Also, If I add an event from [event_form] page but try to edit it, it will accept any date format, however will not update the date...

    I tried to dig in the code and found this:
    In file "when.php". (You can find it in "\wp-content\plugins\events-manager\templates\forms\event\when.php")

    <p class="em-date-range">
      <?php _e ( 'From ', 'dbem' ); ?>
      <input class="em-date-start em-date-input-loc" type="text" />
      <input class="em-date-input" type="hidden" name="event_start_date" value="<?php echo $EM_Event->event_start_date ?>" />
      <?php _e('to','dbem'); ?>
      <input class="em-date-end em-date-input-loc" type="text" />
      <input class="em-date-input" type="hidden" name="event_end_date" value="<?php echo $EM_Event->event_end_date ?>" />
    </p>

    in this code the hidden fields are the ones that store the date. That is why every time I try to edit the date it will accept my new date but will not store it in the DB. I changed the hidden inputs to text and that showed me the current event dates and if you change the date it will be stored in the DB, however you will not get the date-picker...

    Hope this is helpful!

  12. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    you'll need to fix whatever is causing a conflict in your theme or other plugin to get the datepicker to work.

    do you have a link for us to see?

    generally speaking the majority of themes with this problem have this issue - http://msyk.es/blog/prevent-jquery-wordpress-theme/

    I'm certain that you still have some sort of plugin/theme enabled that's causing the problem, it happens to some users every so often and every time it was due to one or the other.

  13. radi_v
    Member
    Posted 1 year ago #

    Marcus, the problem is not in the datepicker.
    I would consider that there is something wrong with my plugins and theme if it was not working in

    [event_form]

    but since it is working there, but not in the front-end edit event it must be the Events Manager.

  14. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    I'd still argue it's your theme or a conflicting plugin, as this definitely works (you'd be seeing a LOT more complaints about this otherwise). We use the exact same file to generate the event dates form, even in the admin area.

    Have you tried it with the 20 11 theme and/or other plugins disabled?

  15. gerrish150
    Member
    Posted 1 year ago #

    I've read through the thread because I am having the same issue with dates. I've narrowed it down to theme. Any ideas on what to change to make them work together? Not well versed in this stuff. deervalleytimes.com

  16. agelonwl
    Member
    Posted 1 year ago #

    have you tried to temporarily:

    - deactivating all other plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    e.g. http://deervalleytimes.com/wp-content/plugins/eventify/js/ui.datepicker.js?ver=3.4.2

  17. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    assuming it is your theme, then you'd need to look into why your theme is doing this, could be a few reasons.

    One could be described here, or also specifically by the comment at the bottom of that page - http://msyk.es/blog/prevent-jquery-wordpress-theme/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags