How to Create a Calendar List in Modern SharePoint Online Site?

SharePoint Online calendar list provides a convenient and visual way to organise meetings, and events. You can display calendar lists in daily, weekly, and monthly views.

Adding a calendar to a SharePoint Online modern site is a bit tricky, as it’s moved under “Classic Apps”. To create a calendar list in SharePoint Online, follow these steps:

  • Login to your SharePoint Online modern site >> Click on the “New” toolbar >> Choose “App”.how to create calendar list sharepoint online
  • On the SharePoint Apps page, click on “Classic Experience” link. This will take you to the classic apps page. (URL shortcut: this URL: https://YourDomain.sharepoint.com/sites/Your-Site/_layouts/15/addanapp.aspx)sharepoint online create calendar app
  • Scroll down (or search) and pick “Calendar” app.create calendar sharepoint online
  • Enter the name for your calendar and click on “Create”.add calendar in sharepoint online

Now, you have a calendar list created on the SharePoint Online modern site.

SharePoint Online: PowerShell to Create a Calendar

Let’s create a calendar in SharePoint Online using PowerShell:

#Parameters
$SiteURL = "https://crescent.sharepoint.com"
$CalendarName = "Firm Events" 

Try { 
    #Connect to PnP Online
    Connect-PnPOnline -Url $SiteURL -Interactive
 
    #Get the File
    $Calenar = New-PnPList -Title $CalendarName -Template Events -ErrorAction Stop
    Write-host "Calendar List Added to the Site!" -f Green
    }
Catch {
    write-host -f Red "`tError:" $_.Exception.Message
}

Create Calendar List in SharePoint Online using PowerShell CSOM

#Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

#Parameters
$SiteURL = "https://CrescentIntranet.sharepoint.com"
$CalendarName = "Firm Events"

Try {
    #Get Credentials to connect
    $Cred = Get-Credential
 
    #Setup the context
    $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
    $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password)

    #Create a Calendar
    $ListInfo = New-Object Microsoft.SharePoint.Client.ListCreationInformation
    $ListInfo.Title = $CalendarName
    $ListInfo.TemplateType = 106
    $List = $Ctx.web.Lists.Add($ListInfo)
    $List.Description = $ListTitle
    $List.Update()
    $Ctx.ExecuteQuery()

    Write-host "Calendar List Added to the Site!" -f Green
}
Catch {
    write-host -f Red "`tError:" $_.Exception.Message
}

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

Your email address will not be published.