Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-HTMLCalendar

Namespace PSWriteHTML

Creates a new HTML calendar using FullCalendar library.

Remarks

This function creates a new HTML calendar using the FullCalendar library. It allows customization of various calendar settings such as header elements, initial view, default date, event handling, and more.

Examples

Authored help example

EXAMPLE 1


New-HTMLCalendar -CalendarSettings {
    # Define calendar settings here
}
        

Creates a new HTML calendar with default settings.

EXAMPLE 2


New-HTMLCalendar -CalendarSettings {
    # Define calendar settings here
} -HeaderLeft 'prev', 'next' -HeaderCenter 'title' -HeaderRight 'dayGridMonth', 'timeGridWeek' -DefaultDate (Get-Date) -NavigationLinks $true -NowIndicator $true -EventLimit $true -WeekNumbers $true -Selectable $true -SelectMirror $true -BusinessHours -Editable -InitialView 'dayGridMonth' -UrlTarget 'https://example.com' -EventTimeFormat @{
    hour           = '2-digit'
    minute         = '2-digit'
    omitZeroMinute = $false
    meridiem       = $false
    hour12         = $false
} -SlotLabelFormat @{
    hour           = '2-digit'
    minute         = '2-digit'
    omitZeroMinute = $false
    meridiem       = $false
    hour12         = $false
}
        

Creates a new HTML calendar with custom settings.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

New-HTMLCalendar [-BusinessHours] [-CalendarSettings <ScriptBlock>] [-DefaultDate <DateTime>] [-Editable] [-EventLimit <Boolean>] [-EventTimeFormat <IDictionary>] [-HeaderCenter <prev>] [-HeaderLeft <prev>] [-HeaderRight <prev>] [-InitialView <dayGridDay>] [-NavigationLinks <Boolean>] [-NowIndicator <Boolean>] [-Selectable <Boolean>] [-SelectMirror <Boolean>] [-SlotLabelFormat <IDictionary>] [-UrlTarget <String>] [-WeekNumbers <Boolean>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

BusinessHours SwitchParameter optionalposition: namedpipeline: False
Indicates whether business hours are displayed on the calendar.
CalendarSettings ScriptBlock optionalposition: 0pipeline: False
Specifies the script block containing settings for the calendar.
DefaultDate DateTime optionalposition: 4pipeline: False
Specifies the default date to display on the calendar.
Editable SwitchParameter optionalposition: namedpipeline: False
Indicates whether events are editable on the calendar.
EventLimit Boolean optionalposition: 7pipeline: False
Indicates whether to limit the number of events displayed on a day.
EventTimeFormat IDictionary optionalposition: 13pipeline: False
Specifies the format for displaying event times.
HeaderCenter String[] optionalposition: 2pipeline: Falsevalues: 15
Specifies the element to display in the center of the calendar header.
Possible values: prev, next, today, prevYear, nextYear, dayGridDay, dayGridWeek, dayGridMonth, timeGridWeek, timeGridDay, listDay, listWeek, listMonth, title, listYear
HeaderLeft String[] optionalposition: 1pipeline: Falsevalues: 15
Specifies the elements to display on the left side of the calendar header.
Possible values: prev, next, today, prevYear, nextYear, dayGridDay, dayGridWeek, dayGridMonth, timeGridWeek, timeGridDay, listDay, listWeek, listMonth, title, listYear
HeaderRight String[] optionalposition: 3pipeline: Falsevalues: 15
Specifies the elements to display on the right side of the calendar header.
Possible values: prev, next, today, prevYear, nextYear, dayGridDay, dayGridWeek, dayGridMonth, timeGridWeek, timeGridDay, listDay, listWeek, listMonth, title, listYear
InitialView String optionalposition: 11pipeline: Falsevalues: 9
Specifies the initial view of the calendar.
Possible values: dayGridDay, dayGridWeek, dayGridMonth, timeGridDay, timeGridWeek, listDay, listWeek, listMonth, listYear
NavigationLinks Boolean optionalposition: 5pipeline: False
Indicates whether navigation links are enabled on the calendar.
NowIndicator Boolean optionalposition: 6pipeline: False
Indicates whether the current time indicator is displayed on the calendar.
Selectable Boolean optionalposition: 9pipeline: False
Indicates whether events can be selected on the calendar.
SelectMirror Boolean optionalposition: 10pipeline: False
Indicates whether a mirror effect is applied when selecting events.
SlotLabelFormat IDictionary optionalposition: 14pipeline: False
Specifies the format for displaying slot labels.
UrlTarget String optionalposition: 12pipeline: False
Specifies the target URL for calendar events.
WeekNumbers Boolean optionalposition: 8pipeline: False
Indicates whether week numbers are displayed on the calendar.