I want to use an image of a calendar to show/hide the jquery datepicker. Based on the documentation it looks like I need to set buttonImage and buttonImageOnly, which I have. the date picker is working but it is always visible. here is my code:
<script type="text/javascript">
$(document).ready(function(){
$("#datepicker").datepicker({
altField: '#from',
altFormat: 'yymmdd',
buttonImage: 'datepicker.png',
buttonImageOnly: true,
defaultDate: <?=getDaysFromToday($_GET['from'])?>,
showOn: 'focus'
});
});
$('#datepicker').datepicker({
onSelect: function(dateText, inst) {
$("#myform").submit();
}
});
</script>
Also I am trying to make it submit a form when you choose a date, I can't seem to get that to work either.
Am I doing something wrong?
Thanks!