mvc calendar

How to use the calendar in mvc ?

  • To use the calendar in mvc first we have to install the ui.css and ui.js libraries.   
  • For install the these libraries right click on your application and goto  Manage NuGet Packages.

  • After selecting the Manage NuGet Packages then select a Browser for downloading  these ui.css and ui.js libraries.
  • And search jQuery .UI.Combined in search box for ui.css and ui.js libraries. 
  • Then download the file then we get the references in scripts folder and content folder.
  • Then paste these references from scripts folder and content folder.

<link href=”~/content/themes/base/jquery-ui.min.css” rel=”stylesheet” />

    <script src=”~/scripts/jquery-1.12.4.js”></script>

    <script src=”~/scripts/jquery-ui-1.12.1.min.js”></script>

  • And first paste a ui.min.css  then js and ui.min.js .
  • For write a code for calendar.

<input type=”text” id=”StateDropdown”/>

   $(“#StateDropdown”).datepicker({

                                dateFormat:’dd:mm:yyyy’

                            });

  • Then we get a calendar like this.

Leave a comment

Your email address will not be published. Required fields are marked *