I have been taking my first jQuery tutorial this morning. And it was a bit confusing. For now I just want to show a DatePicker in my asp page using jQuery UI. I have seen multiple samples out there.
This site is instructing to download jQuery UI. Is it necessary to download any of these files/plugins into project folders? What about the portability of the web page? Can't I just refer to online resources to use DatePicker widget like what this tutorial shows?
Such as what's explained in this site:-
Using the JQuery Library hosted by Google CDN (Content Distribution Network) in ASP.Net Applications. Google's Content Distribution Network(also, AJAX Libraries API ) hosts most widely used open source JavaScript libraries which can be used globally across the websites. The main advantage of using google's CDN is they manage all the bug fixes, recent updates and provide a high speed access due to better caching, etc. If we are hosting a public website that uses JQuery, then it is advisable to use this Google's feature to host the JQuery library for us.
References:
EDIT:
Showing the Plunker code in my aspx page is an issue now. I just want to show the date picker in textbox during edit mode.
<link href="default.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.8.0.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.js" type="text/javascript"></script>
<link href="http://code.jquery.com/ui/1.9.1/themes/smoothness/jquery-ui.css" rel="Stylesheet" type="text/css" />
<script type="text/javascript">
$(function () {
$('#StartDateTBox').datepicker()
})
</script>
<asp:TemplateField HeaderText="Start Date">
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("[Start Date]") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="StartDateTBox" runat="server"></asp:TextBox>
</EditItemTemplate>
<ItemStyle CssClass="itask" />
</asp:TemplateField>