I'm having troubles with the following code:
<link type="text/css" href="http://jqueryui.com/latest/themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.4.2.js"></script>
<script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/tags/1.8rc1/jquery-1.4.1.js"></script>
<script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/tags/1.8rc1/ui/jquery-ui.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
      $("#datepicker").datepicker({ gotoCurrent: false,
          onSelect: function(date, inst) { window.location = "diary.php?date="+date; },
          dateFormat: 'dd-mm-yy',
          defaultDate: <?php if(isset($_GET['date'])) { echo $_GET['date']; } else { echo "null"; } ?>
      });
  });
</script>
For some reason, when I select a date and switch pages - it doesn't go to the defaultDate that is in the $_GET['date'] paramter. Instead it goes off to some random page. The defaultDate description says it will accept strings in the same format set in the code.
Thanks in advance for any help.