Hi,
I'm using datepicker, and i want the selection of a new date to have the effect of loading a new url. So used the onSelect: event
I tried, didn't work. Simplified my code to just have this :
$(function() {
$( "#datepicker" ).datepicker();
$( "#datepicker" ).datepicker( "option", "dateFormat", 'yy-mm-dd' );
$("#trigger").click(function() {
$("#datepicker").datepicker( "show" );
});
$("#datepicker").datepicker({
onClose: function(calDate) {
//window.location.href = baseCal+dateText;
//var calUrl = baseCal+calDate;
alert("Closed !");
}
});
});
in a separate jquery_datepicker.js file (I use smarty).
and the html code :
<form>
<div class="tete">
<script>
var baseCal = "{$barre.basecal}";
</script>
<script type="text/javascript" src="/js/jquery_datepicker.js"></script>
<input type="hidden" id="datepicker">
<a href="#" id="trigger">Calendrier</a>
</div>
</form>
This does not work at all, and I can't understand why : when I select a date nothing happens, no alert. Same story if I replace onSelect with onClose.
I suppose this is so big I just can't see it...
thanks in advance for opening my eyes
glouk