Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple script to automatically refresh a SharePoint 2010 calendar's items every 10 seconds
<script type="text/javascript">
setInterval(function() {
try {
var calendar = SP.UI.ApplicationPages.CalendarInstanceRepository.firstInstance(); // Get the first calendar instance on the page
if (calendar) {
calendar.refreshItems(); // async refresh of calendar items
}
}
catch (e) {
// ignore
}
}, 10000); // Every 10 seconds
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.