For the complete documentation index, see llms.txt. This page is also available as Markdown.

New-UDTimePicker

Creates a time picker.

Synopsis

Creates a time picker.

Syntax

New-UDTimePicker [[-Id] <String>] [[-Label] <String>] [[-OnChange] <Endpoint>] [[-Value] <DateTime>] [[-Locale] <String>] [[-ClassName] <String>] [-DisableAmPm] [[-TimeZone] <Object>] [<CommonParameters>]

Description

Creates a time picker. This component can be used stand alone or within New-UDForm.

Parameters

-Id

The ID of the component. It defaults to a random GUID.

Required?                    false
Position?                    1
Default value                [Guid]::NewGuid().ToString()
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

-Label

The label to show with the time picker.

-OnChange

A script block to call when the time is changed. The $EventData variable contains the currently selected time.

-Value

The current value of the time picker.

-Locale

Change the language of the time picker.

-ClassName

A CSS class to apply to the time picker.

-TimeZone The time zone to use for the time picker. This should be an IANA time zone string.Required? falsePosition? 7Default valueAccept pipeline input? falseAliasesAccept wildcard characters? false <CommonParameters> This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).Outputs-------------------------- EXAMPLE 1 --------------------------PS >New-UDTimePicker -Id 'timepicker1'Basic Time Picker|Creates a basic time picker.-------------------------- EXAMPLE 2 --------------------------PS >New-UDTimePicker -Id 'timepicker2' -OnChange {PS > Show-UDToast -Message "Time changed to $($EventData)"PS > }OnChange|Creates a time picker with an OnChange script block.-------------------------- EXAMPLE 3 --------------------------PS >New-UDTimePicker -Id 'timepicker3' -Value "12:00"Value|Creates a time picker with a value.-------------------------- EXAMPLE 4 --------------------------PS >New-UDTimePicker -Id 'timepicker4' -Locale "de"Locale|Creates a time picker with a German locale.-------------------------- EXAMPLE 5 --------------------------PS >New-UDTimePicker -Id 'timepicker5' -DisableAmPmDisableAmPm|Creates a time picker with 24-hour time.-------------------------- EXAMPLE 6 --------------------------PS >New-UDTimePicker -Id 'timepicker6' -TimeZone "America/New_York"TimeZone|Creates a time picker with a specific time zone.

Last updated

Was this helpful?