locked
Sharepoint 2013 calendar default view for next month RRS feed

  • Question

  • Hi,

    i want to show default next month events in sharepoint 2013 calendar view.

    please help.

    regards,

    Raj

    • Moved by Victoria Xia Monday, March 9, 2015 8:34 AM sp2013
    Friday, March 6, 2015 6:36 PM

Answers

    • Proposed as answer by Victoria Xia Wednesday, March 18, 2015 3:05 PM
    • Marked as answer by Victoria Xia Sunday, March 22, 2015 12:20 PM
    Monday, March 9, 2015 4:20 PM
  • Hi,

    In addition to the suggestion from John.

    You also can achieve it programmatically.

    You can click the next month by JQuery and the default view is next month.

    The code is below:

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
    var itv;
    var s;
    var nextMonth;
    var monthAry = ["January","Feburary","March","April","May","June","July","August","September","October","November","December"];
    $(function(){
    	var d = new Date();
    	var dd = d.getDate();
    	var mm = d.getMonth()+1;
    	var yy = d.getFullYear();
    	var mmm = mm+1;	
    	s = mmm+"/"+dd+"/"+yy;	
    	nextMonth = monthAry[mm];
    	itv = setInterval(ready, 1000);
    });
    function ready()
    {
    	var header = $("#WPQ2_nav_header").html().trim();
    	if(header.indexOf(nextMonth)>=0)
    	{
    	  clearInterval(itv);
    	}	
    	else
    	{
    		ClickDay(s);
    	}
    }
    </script>

    Best regards,

    Sara Fan


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.


    • Proposed as answer by Victoria Xia Wednesday, March 18, 2015 3:05 PM
    • Marked as answer by Victoria Xia Sunday, March 22, 2015 12:20 PM
    • Edited by Sara Fan Wednesday, April 8, 2015 4:29 AM
    Tuesday, March 10, 2015 9:43 AM

All replies

    • Proposed as answer by Victoria Xia Wednesday, March 18, 2015 3:05 PM
    • Marked as answer by Victoria Xia Sunday, March 22, 2015 12:20 PM
    Monday, March 9, 2015 4:20 PM
  • Hi,

    In addition to the suggestion from John.

    You also can achieve it programmatically.

    You can click the next month by JQuery and the default view is next month.

    The code is below:

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
    var itv;
    var s;
    var nextMonth;
    var monthAry = ["January","Feburary","March","April","May","June","July","August","September","October","November","December"];
    $(function(){
    	var d = new Date();
    	var dd = d.getDate();
    	var mm = d.getMonth()+1;
    	var yy = d.getFullYear();
    	var mmm = mm+1;	
    	s = mmm+"/"+dd+"/"+yy;	
    	nextMonth = monthAry[mm];
    	itv = setInterval(ready, 1000);
    });
    function ready()
    {
    	var header = $("#WPQ2_nav_header").html().trim();
    	if(header.indexOf(nextMonth)>=0)
    	{
    	  clearInterval(itv);
    	}	
    	else
    	{
    		ClickDay(s);
    	}
    }
    </script>

    Best regards,

    Sara Fan


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.


    • Proposed as answer by Victoria Xia Wednesday, March 18, 2015 3:05 PM
    • Marked as answer by Victoria Xia Sunday, March 22, 2015 12:20 PM
    • Edited by Sara Fan Wednesday, April 8, 2015 4:29 AM
    Tuesday, March 10, 2015 9:43 AM