# TimeUpDown

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

* [Control](/api/wisej.web/general/control.md)
  * [UpDownBase](/api/wisej.web/editors/wisej.web.updownbase.md)
    * [TimeUpDown](/api/wisej.web/editors/timeupdown.md)

Represents a spinner control that displays [TimeSpan](https://docs.microsoft.com/dotnet/api/system.timespan) values.

{% tabs %}
{% tab title="C#" %}

```csharp
public class TimeUpDown : UpDownBase, ISupportInitialize, INotifyPropertyChanged
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class TimeUpDown
    Inherits UpDownBase
    Implements ISupportInitialize, INotifyPropertyChanged
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) TimeUpDown()

Initializes a new instance of the [TimeUpDown](/api/wisej.web/editors/timeupdown.md) class.

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) Format

[TimeUpDownFormat](/api/wisej.web/editors/timeupdown/wisej.web.timeupdownformat.md): Returns or sets the format use to display and parse the time value. (Default: `HHMM`)

### ![](/files/hsR4ok3152WyAf8J2C1u) HidePromptOnLeave

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the prompt characters in the input mask are hidden when the control loses focus. (Default: `False`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Maximum

[TimeSpan](https://docs.microsoft.com/dotnet/api/system.timespan): Returns or sets the maximum value for the time editor.

### ![](/files/hsR4ok3152WyAf8J2C1u) Minimum

[TimeSpan](https://docs.microsoft.com/dotnet/api/system.timespan): Returns or sets the minimum allowed value for time editor.

### ![](/files/hsR4ok3152WyAf8J2C1u) NullableValue

[Nullable\<TimeSpan>](https://docs.microsoft.com/dotnet/api/system.nullable-1): Returns or sets the [Value](#value) assigned to the spin box (also known as an up-down control) with the difference that when the text is empty it returns null.

This property should be used when the [TimeUpDown](/api/wisej.web/editors/timeupdown.md) may hold a null value and it's bound to a database nullable column. **Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The assigned value is less than the [Minimum](#minimum) property value; or the assigned value is greater than the [Maximum](#maximum) property value.

### ![](/files/hsR4ok3152WyAf8J2C1u) PromptChar

[Char](https://docs.microsoft.com/dotnet/api/system.char): Returns or sets the character used to represent the absence of user input in the [TimeUpDown](/api/wisej.web/editors/timeupdown.md) control. <mark style="color:blue;background-color:green;">Since 3.5.5</mark> (Default: `_`)

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception) The character specified when setting this property is not a valid prompt character.

### ![](/files/hsR4ok3152WyAf8J2C1u) Text

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the text to be displayed in the [TimeUpDown](/api/wisej.web/editors/timeupdown.md) control. (Default: `""`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Value

[TimeSpan](https://docs.microsoft.com/dotnet/api/system.timespan): Returns or sets the value assigned to the [TimeUpDown](/api/wisej.web/editors/timeupdown.md) editor.

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The assigned value is less than the [Minimum](#minimum) property value; or the assigned value is greater than the [Maximum](#maximum) property value.

## Methods

### ![](/files/lzopMboA31bVq8UIcbT3) OnTextChanged(e)

Fires the [TextChanged](#textchanged) event.

| Parameter | Type                                                                | Description                                                                                          |
| --------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | An [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnValidating(e)

Fires the [Validating](/api/wisej.web/general/control.md#validating) event.

| Parameter | Type                                                                                           | Description                                                                                         |
| --------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [CancelEventArgs](https://docs.microsoft.com/dotnet/api/system.componentmodel.canceleventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnValueChanged(e)

Fires the [ValueChanged](#valuechanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebEvent(e)

Processes the event from the client.

| Parameter | Type                                                        | Description      |
| --------- | ----------------------------------------------------------- | ---------------- |
| **e**     | [WisejEventArgs](/api/wisej.core/general/wisejeventargs.md) | Event arguments. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebRender(config)

Renders the client component.

| Parameter  | Type                                                          | Description                   |
| ---------- | ------------------------------------------------------------- | ----------------------------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic configuration object. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebUpdate(state)

Updates the client component using the state information.

| Parameter | Type                                                          | Description           |
| --------- | ------------------------------------------------------------- | --------------------- |
| **state** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic state object. |

### ![](/files/lzopMboA31bVq8UIcbT3) UpdateEditText()

Displays the current value of the spin box (also known as an up-down control) in the appropriate format.

### ![](/files/lzopMboA31bVq8UIcbT3) ValidateEditText()

Validates and updates the text displayed in the spin box (also known as an up-down control).

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). True if the text represents a valid value.

## Events

### ![](/files/hsR4ok3152WyAf8J2C1u) ValueChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the [Value](#value) property has been changed in some way.

## Implements

| Name                                                                              | Description                                                                                                                                          |
| --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata.md)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface.                                      |
| [IBindableComponent](/api/wisej.web/data-binding/wisej.web.ibindablecomponent.md) | Bindable components implement this interface.                                                                                                        |
| [IDropTarget](/api/wisej.web/interfaces/wisej.web.idroptarget.md)                 | Controls that support drag & drop operations implement this interface.                                                                               |
| [ILabel](/api/wisej.web/interfaces/wisej.web.ilabel.md)                           | Provides access to the [LabelWrapper](/api/wisej.web/editors/wisej.web.labelwrapper.md) associated with the controls that implement this interface.  |
| [IReadOnly](/api/wisej.web/interfaces/wisej.web.ireadonly.md)                     | Provides access to the [ReadOnly](/api/wisej.web/interfaces/wisej.web.ireadonly.md#readonly) property for coontrols that support the read-only mode. |
| [IValidation](/api/wisej.web/interfaces/wisej.web.ivalidation.md)                 | Provides access to the validation events and properties property for controls that support validation.                                               |
| [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                                                       |
| [IWisejControl](/api/wisej.core/interfaces/wisej.core.iwisejcontrol.md)           | All wisej controls derived from the [Control](/api/wisej.web/general/control.md) class must implement this interface.                                |
| [IWisejSerializable](/api/wisej.core/interfaces/wisej.core.iwisejserializable.md) | Allows an object to serialize itself.                                                                                                                |


---

# Agent Instructions: 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:

```
GET https://docs.wisej.com/api/wisej.web/editors/timeupdown.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
