what happens when you say:
$('#date_pick').datepicker( {
onClose: function(date) {
alert(date);
}
});
maybe it's the Date, but it's a string value and needs to be converted
into an object of type date first (and i just tested this and it
works)
$('#date_pick').datepicker( {
onClose: function(date) {
var dt = new Date(date);
alert(dt.getMonth());
}
});
On Mar 30, 9:09 am, jester <[email protected]> wrote:
> The docs for the onClose event in datepicker say "The function
> receives the selected date as a Date and the datepicker instance as
> parameters." However, I can't seem to use this as a Date object:
>
> $('#date_pick').datepicker( {
> onClose: function(date) {
> var m = date.getMonth();
> alert(m); } } );
>
> This throws a "date.getMonth is not a function" error.
>
> How am I meant to use this?
>
> Thanks.
>
> (This is a much-shortened version of a question I sent last week.)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---