freqdec / datePicker

An attempt at writing a flexible, framework free, feature-rich and accessible datepicker
http://freqdec.github.io/datePicker/
MIT License
171 stars 56 forks source link

Safari fires an error #26

Closed shinze closed 9 years ago

shinze commented 11 years ago

The error that I have on Safari 6.0.5 desktop and iOS 7 mobile Safari :

TypeError: Attempted to assign to readonly property. on line 144. No error in Chrome or Safari on the same thing.

freqdec commented 11 years ago

Hi Gaëtan,

This will be difficult for me to fix as I have no Mac and no iPhone (yep, there actually is someone!). I've an iPad lying around somewhere - shall have to update to iOs7 and see what happens...

shinze commented 11 years ago

Hi Freqdec, The bug is visible on Safari on ios6 too. (Sorry my previous comment was vague)

ronanguilloux commented 11 years ago

+1 : This datepicker various testing demos (http://freqdec.github.io/datePicker/demo) don't work on Safari 6 (used Safari version 6.0.5 / 8536.30.1 on a Mac OS X 10.8.5).

In absolute, the Safari error (unminified version) should have been easy to "workaround", since it's a known Safari 6 bug (http://craigsworks.com/projects/forums/showthread.php?tid=3649):

1 - remove "use strict" on line 1

2 - change the way you access the defaultVal property on line 3258:

options.formElements[elemID],defaultVal = ...

should be changed into

options.formElements[elemID]['defaultVal'] = ...

But unfortunately it is not sufficient to make this calendar work on Safari :-(

freqdec commented 11 years ago

Hi Ronan,

Is there another error thrown even when the new defaultVal code is used?

ronanguilloux commented 11 years ago

unfortunately, no : Js console remains quiet, but no datepicker appears.

stephenmathieson commented 10 years ago

+1 for Safari support

freqdec commented 10 years ago

Hi Guys,

Back from the dead but still can't fix the bug. I have a 20 dollar paypal bounty for anyone who can though. Just send a pull request with the fix.

Sorry - that's the best that I can do at this time.

dasjestyr commented 10 years ago

bump

dasjestyr commented 10 years ago

Seems to work now except 1 thing: the calendar icon seems to be inaccessibly by the keyboard.

freqdec commented 10 years ago

Hi Guys,

Looks like Damien gets the reward (Damien, if you want it in euro that's no problem - remember to send me your details so I can send the payment).

Unfortunately, my laptop died to merging the code etc shall have to wait until I buy another and restore git etc...

Also, I think Safari will never tab to controls unless you have specifically told it to do so in the preferences.

freqdec commented 10 years ago

Damien, just sent 30 AUD to you via Paypal. Many thanks for the fix.

dkeeghan commented 10 years ago

@freqdec No probs at all, thanks for the reward :+1:

1lexis commented 10 years ago

I'm not really sure... but it can't work. options.formElements[elemID] is a string.

raphaelstolt commented 9 years ago

How about merging this one?

freqdec commented 9 years ago

Fixed in latest version.