Prevent autoselection on datepicker
Hello
I use an inline datepicker. The thing I want to do is that when the user click selects a date, the page redirect to another page (Im using onSelect). I have the datepicker hidden (using .hide() in the jQuery(document).ready())
The problem is that the datepicker autoselects a date at the moment I show it and because of that redirects before the user selects a date by his own.
So, is there a solution for that? Like an option "autoselect=false" or something?
Thanks in advance and my apologies for my english.
This is the function called when the user clicks on <li>:
function calendario() {
jQuery("#datepicker").datepicker("destroy");
jQuery("#datepicker").hide();
jQuery("#datepicker").datepicker({ beforeShowDay: jQuery.datepicker.noWeekends, maxDate: -1 });
jQuery("#datepicker").datepicker({ onselect: Redirecciona()});
jQuery("#datepicker").datepicker(jQuery.datepicker.regional['es']);
jQuery("#datepicker").slideDown("slow");
}
The function "Redirecciona()" has some validations and the window.location(). This function is called only by the datepicker's onselect.