Show month, day and week view in SharePoint 2013 Calendar list using JavaScript

How to Show month, day and week view in SharePoint 2013 Calendar list using JavaScript

Step 1: Go to your Calendar list, Edit page and add Script Editor Web Part to it.

Step 2: Paste the below code to Script Editor Web Part
Code:
                <script type="text/javascript">
                function TestDay()
                {
                   CoreInvoke('MoveView','day');
                }
               
                function TestWeek()
                {
                   CoreInvoke('MoveView','week');
                }             
               
                function TestMonth()
                {
                   CoreInvoke('MoveView','month');
                }                                             
                </script> 



 <div style="float:right;">
 <a href="#" onclick="TestDay()"><img src="/sites/rajat/SiteAssets/images/Calendar_Day1.png" />Day</a>&nbsp;&nbsp;
<a href="#" onclick="TestWeek()"><img src="/sites/rajat/SiteAssets/images/Calendar_Week1.png"/>Week</a>&nbsp;&nbsp;
<a href="#" onclick="TestMonth()"><img src="/sites/rajat/SiteAssets/images/Calendar_Month1.png"/>Month</a>
</div>




Comments

Popular posts from this blog

How to Customize exported excel's cell background color in Datatables

Clear DataTable on button click

Get more than 5000 list items in SharePoint using Deferred Promises jQuery