I probably just spent the last two hours trying to figure it out.
The specific error that occurs with my MVC application is: "0x800a01b6 - JavaScript runtime error: the object does not support the property or method 'datepicker'"
Here is my code:
_Layout.cshtml:
<head> ... <script type="text/javascript" src="../../Scripts/jquery-2.0.3.js"></script> <script type="text/javascript" src="../../Scripts/jquery-ui-1.10.3.js"></script> </head>
view .cshtml
@{ ... Layout = "~/Views/Shared/_Layout.cshtml"; } ... <div> Change Time Span: <br /> From: <input type="text" id="test" /> </div> <div class="loading" id="container">@Model.LoadingMessage</div> <script type="text/javascript"> $(document).ready(function () { $('#test').datepicker(); }); </script>
I looked at some potential βduplicateβ issues without success. Here are some of the questions I have addressed:
Error viewing the MVC3 firewall. Microsoft JScript runtime error: the object does not support the jquery datepicker property or method giving the error "The object does not support this property or method" by the datepicker method. Using datepicker in MVC 4.0 to save the date value in db, throwing object does not support this property or method "
- I believe that I am referencing everything I need from jquery to achieve my goal.
- The element is read from jQuery, it can see its value if I set it, so I donβt think my selector is a problem.
- Both jQuery packages were installed through NuGet (the latest version of jQuery and the unified jQuery UI library).
- I restored / cleaned up the Visual Studio solution (in desperation), disconnected the local IIS host and reset it ...
What am I missing? Intellisense even detects that the method exists, and gives me suggestions on why the parameters need to be entered.
Is there something simple that I missed?
source share