Title: &#8220;Invalid date provided&#8221; error, no Current Month showing
Last modified: December 17, 2025

---

# “Invalid date provided” error, no Current Month showing

 *  [mikecargal](https://wordpress.org/support/users/mikecargal/)
 * (@mikecargal)
 * [4 months ago](https://wordpress.org/support/topic/invalid-date-provided-error/)
 * On Safari, as well as all browsers on iOS and iPadOS, I’m not seeing the current
   Date on the Calendar view.
 * I noticed the error:
 * [Warning] Error: Invalid date provided: Invalid Date (events-manager.js, line
   4683)
 * I looked at the stack trace:
 * Error: Invalid date provided: Invalid Date
   (anonymous function) — externals.js:
   10:8109pe — externals.js:10:34408(anonymous function) — externals.js:10:33737calendar_month_init—
   calendar.js:142em_calendar_init — calendar.js:246(anonymous function) — calendar.
   js:254dispatch — jquery.min.js:2:40041dispatchEventsuccess — calendar.js:62c —
   jquery.min.js:2:25310fireWith — jquery.min.js:2:26055l — jquery.min.js:2:77794(
   anonymous function) — jquery.min.js:2:80267
 * and set a stop at calendar.js:142
 * Interestingly… when I’m stopped there, the current Month *does* display. But 
   when I continue script execution, I get the following error:
 * [Warning] Error: Invalid date provided: Invalid Date — events-manager.js:4682(
   events-manager.js, line 4683)
 * And the Current Month no longer displays
    -  This topic was modified 4 months ago by [mikecargal](https://wordpress.org/support/users/mikecargal/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finvalid-date-provided-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [mikecargal](https://wordpress.org/support/users/mikecargal/)
 * (@mikecargal)
 * [4 months ago](https://wordpress.org/support/topic/invalid-date-provided-error/#post-18759733)
 * More info…
 * code is
 *     ```wp-block-code
       // this bit fixes issues if the supplied text value has a mismatch with the real text value due to localization differences between WP and flatpickrlet month_real_value = monthpicker.val() + '-01';fp.setDate( new Date( month_real_value ) );
       ```
   
 * which results in month_real_value of “February 2026-01”
 * Changed my Month Format to “Y-m” and it’s working.
 * Of course I don’t really want it to say “2025-12” at the top of the calendar
 * I snooped around and found an appropriate value that was independent of the format
   selected.
 * Changing the code above as follows, fixes it (at least for me)
 *     ```wp-block-code
       // this bit fixes issues if the supplied text value has a mismatch with the real text value due to localization differences between WP and flatpickrlet month_real_value = monthpicker[0].getAttribute("value") + '-01';fp.setDate( new Date( month_real_value ) );
       ```
   
 * (Site is now working fine, so no longer a good “broken” example)
    -  This reply was modified 4 months ago by [mikecargal](https://wordpress.org/support/users/mikecargal/).
      Reason: formatting
 *  Thread Starter [mikecargal](https://wordpress.org/support/users/mikecargal/)
 * (@mikecargal)
 * [4 months ago](https://wordpress.org/support/topic/invalid-date-provided-error/#post-18759797)
 * Gah!!! Nevermind that fix… now the off by one month bug is back.
 *  Thread Starter [mikecargal](https://wordpress.org/support/users/mikecargal/)
 * (@mikecargal)
 * [4 months ago](https://wordpress.org/support/topic/invalid-date-provided-error/#post-18759969)
 * OK, so the problem is that it parses the date in UTC, and in the eastern time
   zone, midnight on the 1st (UTC) is 7:00 pm at the end of the previous month. 
   But, since we only need the Month, just append “-02” and you avoid this problem.
 * let month_real_value = monthpicker[0].getAttribute(“value”) + ‘-02’;
 * That’s working here now (but you can’t use month picker.val() since that uses
   the formatted value and things don’t work well.
 * I assume there’s probably a better way to get year and month out of monthpicker,
   but the code obfuscation makes it a bit difficult to sort that out.
 *  [uh2112](https://wordpress.org/support/users/razorzz/)
 * (@razorzz)
 * [4 months ago](https://wordpress.org/support/topic/invalid-date-provided-error/#post-18760634)
 * [@mikecargal](https://wordpress.org/support/users/mikecargal/) Can you please
   specify where exactly i can change this value?
 *  Thread Starter [mikecargal](https://wordpress.org/support/users/mikecargal/)
 * (@mikecargal)
 * [4 months ago](https://wordpress.org/support/topic/invalid-date-provided-error/#post-18761011)
 * [@razorzz](https://wordpress.org/support/users/razorzz/)
 * /wp-content/plugins/events-manager/includes/js/events/events-manager.js
 * Search for “this bit fixes” (line 3563 here)
 * replace
 *     ```wp-block-code
       let month_real_value = monthpicker.val() + '-01'; fp.setDate( new Date( month_real_value ) );
       ```
   
 * with:
 *     ```wp-block-code
       fp.setDate( new Date( fp.currentYear, fp.currentMonth, 2 ) );
       ```
   
 * (Note, this is a bit different than the previous solution because I dug a bit
   deeper to find the values from the “proper” place)

Viewing 5 replies - 1 through 5 (of 5 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finvalid-date-provided-error%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=1039078)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

## Tags

 * [calendar](https://wordpress.org/support/topic-tag/calendar/)
 * [ios](https://wordpress.org/support/topic-tag/ios/)
 * [Safari](https://wordpress.org/support/topic-tag/safari/)

 * 5 replies
 * 4 participants
 * Last reply from: [mikecargal](https://wordpress.org/support/users/mikecargal/)
 * Last activity: [4 months ago](https://wordpress.org/support/topic/invalid-date-provided-error/#post-18761011)
 * Status: not resolved