JQuery UI datepicker in Asp.Net MVC

Posted by Frederik on Stack Overflow See other posts from Stack Overflow or by Frederik
Published on 2008-12-22T00:48:26Z Indexed on 2010/06/05 17:52 UTC
Read the original article Hit count: 305

Filed under:
|

I have tried to use some of the widgets in JQuery UI on an Asp.Net MVC site without luck.

For example the basic datepicker from jQuery UI - functional demos.

I have created a simple MVC project and added the script references in Site.Master like this:

<script src="../../Scripts/jquery-1.2.6.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-personalized-1.5.3.min.js" type="text/javascript"></script>
<link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
<link href="../../Content/ui.datepicker.css" rel="stylesheet" type="text/css" />"

In the Index.aspx file I have cleared all default content and added the following:

<script type="text/javascript">
    $("#basics").datepicker();     
</script>  
<input type="text" size="10" value="click here" id="basics"/>

The core jQuery works fine. Any clues?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about jquery-ui