Widgets > wijdatepager > Set the Selected Date |
The wijdatepager widget highlights the currently selected date. Simply set the selectedDate option.
Complete the following steps to set the selected date:
<body>
tags of the page, just after @RenderBody()
:<div id="datepager"></div>
This markup will add content for a datepager widget to the page. In the next step, you'll initialize the datepager.
</div>
tag you added in the previous step, enter the following jQuery script to initialize the wijdatepager widget and set the selectedDate option:
<script type="text/javascript">
$("#datepager").wijdatepager({ selectedDate: new Date(2015, 11, 21) });
</script>
At run time the datepager will appear with 11/21/2015 selected.
What You've Accomplished
Press F5 to run the application, and notice that the datepager appear with 11/21/2015 selected.