MVC5 Classic
Create a Date Picker

The wijinputdate widget allows you to create a drop-down calendar that can be used as a date picker. Set the showTrigger option to true to take advantage of this feature. See the InputDate  > DatePicker sample of the MVC Control Explorer live demo at http://demo.componentone.com/ASPNET/MVCExplorer/inputdate/DatePicker.

  1. Create an C1 ASP.NET MVC 5 Web Application.
  2. In the Solution Explorer, expand the Views | Shared folder and double-click _Layout.cshtml to open the file.
  3. Add the following markup within the <body> tags of the page. 
    <input type="text" id="textbox1" />
  4. After the closing </div> tags you added in the previous step, enter the following jQuery script to initialize the wijinputdate widget and set the showTrigger option.
    <script id="scriptInit" type="text/javascript">
                $(document).ready(function () {
                      $("#textbox1").wijinputdate(
                      {
                            showTrigger: true
                      });
                });
          </script>
    
  5. Press F5 to run the application. Click the drop-down arrow and a calendar appears, allowing you to select a date.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback