timcharper / calendar_date_select

A previously popular but no longer maintained JavaScript DatePicker for RubyOnRails (and others)
http://code.google.com/p/calendardateselect/
Other
409 stars 180 forks source link

IE Compatability Change #17

Closed mvastola closed 13 years ago

mvastola commented 13 years ago

Hi, The problem/fix indicated here (http://ankitbparekh.blogspot.com/2010/04/unknown-runtime-error-ie-in-prototypejs.html) had been causing me grief for months and finding this and making the one line change suggest just today solved all my issues. I have no idea how or why it works, and it's likely an IE bug (at least in that it can't give a descriptive error message), but IE seems to not like the calendar_date_select code.

I would strongly urge you integrate this into your codebase. It causes no negative effects on other browsers. Unfortunately I can no longer link you to my live, non-working site, as that would require my re-breaking it, but if you need proof that this is an issue, please let me know and I'll figure something out.

Thanks, Mike

timcharper commented 13 years ago

Hey Mike...

Back when I wrote CDS, I specifically tested it with IE, and that line of code has been like that for some time. Is it possible that it's a bug with prototype? And, that said bug has since been addressed in a later version of prototype? What version of prototype are you using?

I'll pull it in anyways, since it has no side effects as you claim.

Thanks for the path :) And may IE be damned !!!!!

Tim

timcharper commented 13 years ago

oh wait... there is no patch... and that is a SIGNIFICANT change. Ok, I'm inclined to believe it's an old prototype version issue. What version are you using?

mvastola commented 13 years ago

:-(. It is possible it's a bug with Prototype. I wouldn't know. This fixed it though. Normally I'd debug the error, but there's no way (that I know of) to debug "an unexpected error occurred" when the line of JS has no apparent problems. (I have no idea how this person fixed it.)

I'm using Prototype 1.6.0.3, which is what comes with Rails 2.3.10.

timcharper commented 13 years ago

Can you gist your patched version of calendar_date_select.js ? Then I can create a patch from it easily. Thanks!

mvastola commented 13 years ago

https://gist.github.com/810780 is the patched file. https://gist.github.com/810777 is a patch. :-)

timcharper commented 13 years ago

oh, lol... that's it? From reading your post:

..., just make below changes in your code in all js...

I got the impression there were multiple changes like that... ok, awesome... that was stupid simple. Thanks! Integrated and pushed!

mvastola commented 13 years ago

Haha. Nope. No idea why they wrote the post that way and implied that.

Thanks a ton!

Now.. I've spent way more time in IE than any person should and need to figure out a way to detox.. :-)