Get Jquery Datepicker value on button click

Get Jquery Datepicker value on button click

Dear All,
         I am at beginning stage of the jquery.  And trying to get the value of selected date from datepicker on clicking the button.Below is the writing code ,But found no luck .Can any one help me please
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="utf-8">
  5.   <title>click demo</title>
  6. <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
  7. <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  8.   <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  9.   <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  10.   <link rel="stylesheet" href="/resources/demos/style.css">
  11. </head>
  12. <body>
  13. <script>
  14. $( "#button" ).click(function() {

  15. alert($("#datepicker").datepicker("getDate"));

  16. });
  17. </script>

  18. </body>
  19. </html>
  20. <p>Date: <input type="text" id="datepicker"></p>
  21. <button type="button">Click Me!</button>
  22. </body>
  23. </html>
  24.  

Thanks
SID