> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/es/comandos-de-powershell/new-udtimepicker.md).

# New-UDTimePicker

New-UDTimePicker crea un control de selección de hora en PowerShell Universal, utilizable por sí solo o incrustado dentro de un New-UDForm.

### Sinopsis

Crea un selector de hora.

### Sintaxis

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

### Descripción

Crea un selector de hora. Este componente se puede utilizar de forma independiente o dentro de New-UDForm.

### Parámetros

#### -Id

El ID del componente. De forma predeterminada es un GUID aleatorio.

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

#### -Label

La etiqueta que se muestra con el selector de hora.

```
Required?                    false
Position?                    2
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -OnChange

Un bloque de script al que llamar cuando se cambia la hora. La variable $EventData contiene la hora seleccionada actualmente.

```
Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Value

El valor actual del selector de hora.

```
Required?                    false
Position?                    4
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Locale

Cambia el idioma del selector de hora.

```
Required?                    false
Position?                    5
Default value                en
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ClassName

Una clase CSS que aplicar al selector de hora.

```
Required?                    false
Position?                    6
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -DisableAmPm

Utilice el formato de 24 horas en lugar del AM/PM ante meridiem.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -TimeZone

La zona horaria que se utilizará para el selector de hora. Debe ser una cadena de zona horaria IANA.

```
Required?                    false
Position?                    7
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### Parámetros comunes

Este cmdlet admite los parámetros comunes: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable y OutVariable. Para obtener más información, consulte [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Salidas

### Ejemplos

#### Ejemplo 1: selector de hora básico

```powershell
New-UDTimePicker -Id 'timepicker1'
```

Crea un selector de hora básico.

#### Ejemplo 2: OnChange

```powershell
New-UDTimePicker -Id 'timepicker2' -OnChange {
    Show-UDToast -Message "Time changed to $($EventData)"
}
```

Crea un selector de hora con un bloque de script OnChange.

#### Ejemplo 3: Value

```powershell
New-UDTimePicker -Id 'timepicker3' -Value "12:00"
```

Crea un selector de hora con un valor.

#### Ejemplo 4: Locale

```powershell
New-UDTimePicker -Id 'timepicker4' -Locale "de"
```

Crea un selector de hora con configuración regional alemana.

#### Ejemplo 5: DisableAmPm

```powershell
New-UDTimePicker -Id 'timepicker5' -DisableAmPm
```

Crea un selector de hora con formato de 24 horas.

#### Ejemplo 6: TimeZone

```powershell
New-UDTimePicker -Id 'timepicker6' -TimeZone "America/New_York"
```

Crea un selector de hora con una zona horaria específica.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/es/comandos-de-powershell/new-udtimepicker.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
