SharePoint 2010 Rolling Three Months Calendar -
hi i'm trying develop 3 month rolling calendar view inserting 3 calendar webparts in page , inserting below code in cewp.
the calendars should roll previous or next respectively clicking on button 'prevmonth' , 'nextmonth'.
it seems working roll wrong. can me ?
< script type = "text/javascript" > $(document).ready(function() { window.settimeout(setcal, 1000); }); var currentdate = new date(); function setcal() { $("#prevmonth").click(prevmonth); $("#nextmonth").click(nextmonth); movetodate((currentdate.getmonth() + 2).tostring() + '\u002f' + currentdate.getdate().tostring() + '\u002f' + currentdate.getfullyear().tostring(), 'wpq3'); movetodate((currentdate.getmonth() + 1).tostring() + '\u002f' + currentdate.getdate().tostring() + '\u002f' + currentdate.getfullyear().tostring(), 'wpq2'); movetodate((currentdate.getmonth()).tostring() + '\u002f' + currentdate.getdate().tostring() + '\u002f' + currentdate.getfullyear().tostring(), 'wpq1'); } function prevmonth() { movetodate((currentdate.getmonth() - 1).tostring() + '\u002f' + currentdate.getdate().tostring() + '\u002f' + currentdate.getfullyear().tostring(), 'wpq3'); movetodate((currentdate.getmonth() - 1).tostring() + '\u002f' + currentdate.getdate().tostring() + '\u002f' + currentdate.getfullyear().tostring(), 'wpq2'); movetodate((currentdate.getmonth() - 1).tostring() + '\u002f' + currentdate.getdate().tostring() + '\u002f' + currentdate.getfullyear().tostring(), 'wpq1'); } function nextmonth() { movetodate((currentmonth + 1).tostring() + '\u002f' + currentdate.getdate().tostring() + '\u002f' + currentdate.getfullyear().tostring(), 'wpq3'); movetodate((currentmonth + 1).tostring() + '\u002f' + currentdate.getdate().tostring() + '\u002f' + currentdate.getfullyear().tostring(), 'wpq2'); movetodate((currentmonth + 1).tostring() + '\u002f' + currentdate.getdate().tostring() + '\u002f' + currentdate.getfullyear().tostring(), 'wpq1'); } < /script>
Comments
Post a Comment