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 -
Where in the page are you loading scripts & where are you calling the datepicker initialization?
Here is a sample of using jQuery shorthand document ready & css selectors to initialize datePickers more easily.
Here is the razor code for a sample input box (notice the "datefield" css class)
@Html.LabelFor(m => m.DateOfBirth, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.DateOfBirth, new { @class = "form-control datefield" })
Here is the javascript needed to initialize any datepicker by css selector
$(function () {
$(".datefield").datepicker();
});
I've put together a tutorial detailing the specifics & a sample ASP.NET MVC5 solution on github
http://prestoasp.net/using-the-jquery-datepicker-with-asp-net-mvc/ https://github.com/fredo007/i6technology/tree/master/InsuranceSales