- jquery.ui.core.js
- jquery.ui.core.min.js
- jquery.ui.datepicker.js
- jquery.ui.datepicker.min.js
- $(function ()
- { $(".datefield").datepicker();
- });
Open the Views\Shared\_Layout.cshtml file. You need to add references to the following files, which are all required so that you can use the date picker:
- Content/themes/base/jquery.ui.core.css
- Content/themes/base/jquery.ui.datepicker.css
- Content/themes/base/jquery.ui.theme.css
- jquery.ui.core.min.js
- jquery.ui.datepicker.min.js
- DatePickerReady.js
element in the Views\Shared\_Layout.cshtml file.- <link href="@Url.Content("~/Content/themes/base/jquery.ui.core.css")" rel="stylesheet" type="text/css"/>
- <link href="@Url.Content("~/Content/themes/base/jquery.ui.datepicker.css")" rel="stylesheet type="text/css" />
- <link href="@Url.Content("~/Content/themes/base/jquery.ui.theme.css")" rel="stylesheet" type="text/css"/>
- <script src="@Url.Content("~/Scripts/jquery.ui.core.min.js")" type="text/javascript"></script>
- <script src="@Url.Content("~/Scripts/jquery.ui.datepicker.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/DatePickerReady.js")" type="text/javascript"></script>
Supporting the HTML5 Date Input Control
As more browsers support HTML5, you'll want to use the native HTML5 input, such as the date input element, and not use the jQuery UI calendar. You can add logic to your application to automatically use HTML5 controls if the browser supports them. To do this, replace the contents of the DatePickerReady.js file with the following.
- if (!Modernizr.inputtypes.date) {
- $(function() {
- $(".datefield").datepicker();
- });
- }

Nazmul BadshaPosted Oct 25, 2017, 1:33 AM
Use datepicker as a calender view to intract your site.