Call URL when clicked

Call URL when clicked

Hello


I speak of Brazil, I have the following problem, I need to update the URL with the date that the User click.


I tried something like:


<script type="text/javascript">
  
$ (document). ready (function () (
$ ( '# datepicker "). datepicker ((
onSelect: function (date) (
window.location ( 'http://www.meusite.com.br/?data =' + date)
),
));
  
));
  
</ script>


But it did not work.


Can anyone help me?


Thank you.