Schleid Alex

Schleid Alex

  • NA
  • 361
  • 47.9k

jquery datepicker would not work

Oct 12 2020 4:19 PM
I have an @Html.edifor to show date of birth and I want to use jquery datepicker to show calendar. My scritp code is located in an external js file and proper reference to the file is on the view. I am also using bundle in app config.
 
here is my script
 
$(function ()
{
$("#DateOfBirth").datepicker({ dateFormat: "dd-MMM-yy", changeMonth: true, changeYear: true });
});
 
I am getting the following error. Jquery?v=gywVLk6VvVVR_J6-oRPIvBpBvXSXEW6ZffeMhgu--bE1:1 Uncaught TypeError: $(...).datepicker is not a function.
 
Can someone help me spot what is wrong.
 
Thank you!

Answers (3)