Hi All,

I'm using Kelvin Luck's brilliant datepicker plugin (http://
www.kelvinluck.com/assets/jquery/datePicker/v2/demo/index.html) and am
having a strange issue in Safari Version 3.2.1 (5525.27.1).

I'm running a couple simple lines of my own code that are bound to the
calendar's "dateSelected" event that fires any time a date is clicked
on the calendar. The first line below simply captures the currently
selected date from the calendar as a standard JavaScript Date object
using the datePicker plugin's dpGetSelected() method. It stores that
Date object in a variable named "myDate1":

myDate1 = new Date( $('#calendar1').dpGetSelected() );

Then, I use that "myDate1" variable to render a textual representation
of the selected date to a separate element on the page with this
line:

$('#dateDisplay').html( myDate1.getMonthName(true) + ' ' +
myDate1.getDate() + ', ' + myDate1.getFullYear() );

Which attempts to renders some text like: "Jan 14, 2009"

This all works perfectly in Firefox, but Safari thinks that the Date
object (myDate1) is invalid for some reason.

For testing, I printed out the Date object in Firebug and it looks
just like any other perfectly valid date object. Firefox considers it
valid. So I don't know what Safari's problem is with the Date object
returned by the datePicker plugin's dpGetSelected() method.

Has anyone else ever seen any Date object errors like this in Safari
and could perhaps share any insights?

The same problem also occurs in the latest Webkit nightly build.

Thanks!

Reply via email to