Uncaught TypeError: $(...).datepicker is not a function
hi
here is my code. I want to choose a date and the other will automatically give me 2months later date. its shows me this error "Uncaught TypeError: $(...).datepicker is not a function"
- <!DOCTYPE html>
- <html>
- <head>
- <title>Date Choose Option</title>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
- </head>
- <body>
- <input type="text" class="firstcal">
- <input type="text" class="secondcal">
- <script>
- $(function() {
- $(".firstcal").datepicker({
- dateFormat: "mm/dd/yy",
- onSelect: function(dateText, instance) {
- date = $.datepicker.parseDate(instance.settings.dateFormat, dateText, instance.settings);
- date.setMonth(date.getMonth() + 2);
- $(".secondcal").datepicker("setDate", date);
- }
- });
- $(".secondcal").datepicker({
- dateFormat: "mm/dd/yy"
- });
- });
- </script>
- </body>
- </html>
please help me.
thank you