[#963] Calendar popup doesn't work in Safari (the OS X browser)
Summary Calendar popup doesn't work in Safari (the OS X browser)
Queue Horde Base
Queue Version HEAD
Type Bug
State Resolved
Priority 2. Medium
Requester rwallace (at) thewallacepack (dot) net
Created 2004-12-09 (5884 days ago)
Updated 2004-12-11 (5882 days ago)
Assigned 2004-12-09 (5884 days ago)
Resolved 2004-12-11 (5882 days ago)
Patch No

2004-12-11 04:30:53 Chuck Hagenbuch Comment #4
State ⇒ Resolved
Reply to this comment
Actually, we can do something about it, though damned if this isn't a 
cranky browser combination. Fixed in CVS.
2004-12-09 17:51:36 rwallace (at) thewallacepack (dot) net Comment #3 Reply to this comment
I suppose the biggest question is whether this is a bug in Safari or 
if this is the correct behaviour according to the ECMA standard and 
other browsers are wrong in the way they implement it.  I'm not an 
expert with javascript so I have no idea.

Couldn't we simply add more parameters to the href link in this case 
to get it working?  Something like

link.href = '?target=' + target + '&month=' + (month+1) + '&day=' + 
day + '&year=' + year + '&callback=' + callback;

I don't know if we'd have to worry about encoding the target or not 
because I don't think ? and & are going to be used to name form 
elements by anyone.  Makes it a little harder to get all the stuff you 
need out of the URL, but it should work.
2004-12-09 17:28:13 Jan Schneider Comment #2
State ⇒ Assigned
Reply to this comment
This is a correct analysis, but there is nothing we can do about this, 
but turning most javascript features off for KHTML.
2004-12-09 17:02:51 rwallace (at) thewallacepack (dot) net Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Calendar popup doesn't work in Safari (the OS X browser)
Queue ⇒ Horde Base
Reply to this comment
I have a problem with the calendar popup that is in 
horde/templates/javascript/open_calendar.js.  The calendar displays 
properly when opened, but when you try and select a date it fails and 
sends you to the URL of the link (so like 
http://mydomain.com/horde/kronolith/1) rather than updating the form 

I did some digging and it looks like this is because the anonymous 
onclick function is using variables defined in the openGoto() function 
in which it is created, and in Safari those variables are out of 
scope.  So, in the day onclick function the target, month, day and 
year variables are all out of scope so these lines

document.getElementById(target + '[month]').value = month + 1; 
document.getElementById(target + '[day]').value = day; 
document.getElementById(target + '[year]').value = year;

fail, the return false is never reached and the user is sent to an 
invalid URL.

Saved Queries