Note that there are some explanatory texts on larger screens.

plurals
  1. POMVC 4 Razor and Jquery UI datepicker() "Object doesn't support property or method"
    primarykey
    data
    text
    <p>I've probably just spent the last two hours trying to figure this out. </p> <p>The specific error that is thrown with my MVC application is this: "0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'datepicker'"</p> <p>Here is my code:</p> <p><strong>_Layout.cshtml:</strong></p> <pre><code>&lt;head&gt; ... &lt;script type="text/javascript" src="../../Scripts/jquery-2.0.3.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="../../Scripts/jquery-ui-1.10.3.js"&gt;&lt;/script&gt; &lt;/head&gt; </code></pre> <p><strong>the view .cshtml</strong></p> <pre><code>@{ ... Layout = "~/Views/Shared/_Layout.cshtml"; } ... &lt;div&gt; Change Time Span: &lt;br /&gt; From: &lt;input type="text" id="test" /&gt; &lt;/div&gt; &lt;div class="loading" id="container"&gt;@Model.LoadingMessage&lt;/div&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $('#test').datepicker(); }); &lt;/script&gt; </code></pre> <p>I've looked at several potential "duplicate" questions with no success. Here are some of the questions I've looked at:</p> <p><a href="https://stackoverflow.com/questions/10468102/mvc3-razor-view-error-microsoft-jscript-runtime-error-object-doesnt-support-pr">MVC3 razor view error Microsoft JScript runtime error: Object doesn&#39;t support property or method &#39;datepicker&#39;`</a> <a href="https://stackoverflow.com/questions/6105194/jquery-giving-error-object-doesnt-support-this-property-or-method-on-method-d">jQuery giving error &quot;Object doesn&#39;t support this property or method&quot; on method datepicker</a> <a href="https://stackoverflow.com/questions/16148765/using-datepicker-in-mvc-4-0-to-persist-a-date-value-in-db-throwing-object-does">Using datepicker in MVC 4.0 to persist a date value in db, throwing &quot;object doesn&#39;t support this property or method&quot;</a></p> <ol> <li>I believe I am referencing all that I need from jquery to accomplish my goal.</li> <li>The element is readable from Jquery, it can see its value were I to set it, so I don't think my selector is the problem. </li> <li>Both Jquery Packages were installed via NuGet (the latest Jquery release and the Jquery UI Combined Library)</li> <li>I've rebuilt / cleaned the Visual Studio solution (in desperation), shut down the local IIS host and reset it...</li> </ol> <p>What am I missing? Intellisense even detects that the method exists and is giving me suggestions for what to place in for parameters. </p> <p><strong>Is there something simple I've missed?</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload