I’m using the “anytime.js” framework for a plugin that was developed for displaying upcoming events through WordPress posts.
My problem (and I’m not sure how to give you relevant code to help me) is that the datepicker has suddenly disallowed the selection of the month of February in 2011. Quite inconvenient given that tomorrow is February!
Here is the debug I’ve been able to do:
- JS is applying the “.ui-state-disabled” class to the Feb selection.
- The problem is not related to the month because it’s selectable if I move the datepicker up to 2012.
- The datepicker disables selection of “past” dates and that is definitely the reason this is happening, but the month is not past :/
- The problem seems like it’s in the core JS because it’s happening the same on multiple sites where I use the plugin
Here’s an external link to the full JS file in case anyone feels generous enough and can spot any errors in the code that could be causing this!
http://easterndancer.com/wp/wp-content/plugins/postevents/js/anytime.js
This turned out to be the WEIRDEST problem ever! If you’re using anytime.js, check you current local time. It’s possible that you are in a new month and anytime.js is stuck in the previous month due to a difference between your local timezone and the timezone where your server is located. After midnight my time, the error disappeared. I fixed this by simply allowing the datepicker to pick past events rather than future only, risky but better than wrangling this crazy bug.