javascript - using the getDate function for JQuery Datepicker -
hi :) sorry if question sounds bit stupid not experienced javascript..
i have done code have jquery datepicker calendar displayed on page , works fine. want store date selected in variable called $historydate..i have put following code between tags;
<script> $(function() { $( "#datepicker" ).datepicker(); }); </script>
i have looked getdate function , im guessing along lines of;
var historydate; historydate = $("#datepicker").datepicker('getdate');
im tried method, putting above 2 lines in head tags aswell when try echo historydate() in body nothing? suggestions?
var historydate; $(function() { $("#datepicker").datepicker({ onselect: function(){ historydate = $(this).datepicker('getdate'); } }); });
Comments
Post a Comment