I cannot get jQuery UI working in my ASP.NET MVC4 application. I tried dialog and datepicker.
Here is part of the code of my view.

&lt;link href="../../Content/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" /&gt;
&lt;script src="../../Scripts/jquery-1.5.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="../../Scripts/jquery-ui-1.8.11.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script language="javascript" type="text/javascript"&gt;
$(document).ready(function () {
    alert('A');
    //$('#datepicker').val('test');
    $('#datepicker').datepicker();
    alert('B');
});
&lt;/script&gt;
&lt;h1&gt;Test&lt;/h1&gt;
&lt;form id="testForm" action="#" method="get"&gt;
    &lt;input type="text" id="datepicker" name="datepicker" class="datepicker" /&gt;
&lt;/form&gt;


The alert A is displayed. When I uncomment the next row, the value test is assigned. But datepicker is not working and alert B does not display.

Thanks,
Petr


Question: Bootstrap datepicker default date
Answer: Just a consideration, 
api changed setValue to setDate (http://bootstrap-datepicker.readthedocs.org/en/release/methods.html#setdate)