Date Picker
Date Picker component for Universal Dashboard
Date pickers pickers provide a simple way to select a single value from a pre-determined set.
Date pickers can be used in Forms and Steppers.
1
New-UDDatePicker
Copied!

OnChange Event Handler

The OnChange event handler is called when the date changes. You can access the current date by using the $Body variable.
1
New-UDDatePicker -OnChange {
2
Show-UDToast -Message $body
3
}
Copied!

Variant

You can customize how the date picker is show. The default is the inline variant that displays the date picker popup inline with the input control. You can also use the dialog variant that pops the date picker up in the middle of the screen. Finally, the static variant displays the date picker without having to click anything.
1
New-UDDatePicker -Variant static
Copied!

Locale

To set the locate of the date picker, specify the -Locale parameter.
1
New-UDDatePicker -Locale fr
Copied!
New-UDDatePicker
Name
Type
Description
Required
Id
String
The ID of the component. It defaults to a random GUID.
false
Label
String
The label to show next to the date picker.
false
Variant
String
The theme variant to apply to the date picker.
false
DisableToolbar
SwitchParameter
Disables the date picker toolbar.
false
OnChange
Endpoint
A script block to call with the selected date. The $EventData variable will be the date selected.
false
Format
String
The format of the date when it is selected.
false
Value
DateTime
The current value of the date picker.
false
Locale
String
Specifies the locale for the date picker. Supports en, de, ru, and fr. Defaults to en. Available since 2.3.
false
Last modified 7d ago