Search and Top Navigation
#4966 closed bug (worksforme)
Opened November 18, 2009 08:00PM UTC
Closed February 27, 2012 01:59PM UTC
after redirect in onSelect the datepicker collapses in Safari
Reported by: | orange.x | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.datepicker | Version: | 1.7.2 |
Keywords: | datepicker safari collapse | Cc: | |
Blocked by: | Blocking: |
Description
I'm using the onSelect to redirect from the page to another page that uses the date to show me a newsmessage. It works just fine but when I go back ( via backspace ) the datepicker is collapsed. When I pay attention I can see that it already collapses just before the redirect is done. This problem only occurs in Safari 4.03 and the newest Safari. Firefox has nog problem with the collapsing.
Here you can see what it does: www.orangewebdesign.nl/sites/snijder/nieuws You have to use the big datepicker in the middle of the screen ( the one at the top does it also but the effect of the collapsing isn't clear on that datepicker ). The page will redirect to nieuws/2009-11-19 for example. When you go back it only shows the border of the datepicker.
Here's the code:
$(document).ready(function(){
$("#nieuws_agenda").datepicker({
inline: true,
defaultDate: activeDate,
beforeShowDay: setScheduledDays,
onSelect:
function(value, date) {
datum_parts = value.split('/');
alert(datum_parts[0]);
redirect(value);
alert('The url is: http://www.domein.nl/nieuws/' + value );
}
}).show();
});
and this is the code of the scheduledDays:
function setScheduledDays(date) {
var isScheduled = false;
var isHoliday = false;
var scheduleStatus = "";
// Check for scheduled day
for (i = 0; i < scheduledDays.length; i++) {
if (date.getMonth() == scheduledDays[i][0] - 1 && date.getDate() == scheduledDays[i][1] && date.getFullYear() == scheduledDays[i][2])
{
isScheduled = true;
scheduleStatus = scheduledDays[i][3];
}
}
if (isScheduled)
{
return [true, scheduleStatus];
}
else
{
return [false, ''];
}
}
And the redirect function. I made it because it could solve my problem, but it didn't:
function redirect($datum)
{
window.location = "nieuws/" + $datum;
}
Attachments (0)
Change History (2)
Changed November 23, 2009 01:10AM UTC by comment:1
milestone: | TBD → 1.8 |
---|
Changed February 27, 2012 01:59PM UTC by comment:2
resolution: | → worksforme |
---|---|
status: | new → closed |
Works fine in latest Safari. Had to click back to Januar 2010, click on one of the highlighted links. Going back showed the inline datepicker again.