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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -