When following this tutorial (http://www.asp.net/mvc/tutorials/javascript/using-the-html5-and-jquery-ui-datepicker-popup-calendar-with-aspnet-mvc/using-the-html5-and-jquery-ui-datepicker-popup-calendar-with-aspnet-mvc-part-4), I try to install the jQuery UI WIdgets:Datepicker via NuGet and get the following error:
Attempting to resolve dependency 'jQuery.UI.Core (= 1.8.9)'.
Attempting to resolve dependency 'jQuery (≥ 1.4.4 && < 1.6)'.
Successfully installed 'jQuery 1.4.4'.
Successfully installed 'jQuery.UI.Core 1.8.9'.
Successfully installed 'jQuery.UI.Widgets.Datepicker 1.8.9'.
Install failed. Rolling back...
Updating 'jQuery 1.7.1.1' to 'jQuery 1.4.4' failed. Unable to find a version of 'jQuery.UI.Combined' that is compatible with 'jQuery 1.4.4'.
This is presumably because I have jQuery 1.7.1.1 in the solution for something else. How can I get around this?
If I can't, is there another datepicker I can use in ASP .NET MVC 4 (which I am new to) with clear instructions on using?
I had the exact same problem, so I downloaded the widget manually: http://jqueryui.com/download/
Extracted the folder and added the scripts I needed to my project:
The reason why Nuget failed the installation was because the package was trying to reference jquery.1.4 and MVC 4 needs a higher library.
Hope it helps...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With