Tuesday 9 June 2015

jquery get month and year value on change in datepicker

<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery UI Datepicker - Display inline</title>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
  <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script>
  $(function() {
  $( "#datepicker" ).datepicker({
  onChangeMonthYear :function(da,mon,ob){alert("Year-"+ da +" Month- " + mon);}
});
});
  </script>
</head>
<style>
.ui-datepicker table{display:none;}
</style>
<body>

Date: <div id="datepicker"></div>


</body>
</html>

No comments:

Post a Comment