# ef-time-picker

Control the time input

## Properties

| Property           | Attribute           | Type             | Default | Description                                      |
|--------------------|---------------------|------------------|---------|--------------------------------------------------|
| `amPm`             | `am-pm`             | `boolean`        | false   | Toggles 12hr time display                        |
| `customValidation` | `custom-validation` | `boolean`        | false   | Disable automatic build-in validation checking for partial input of hour, minute & second (if applicable) segments |
| `disabled`         | `disabled`          | `boolean`        | false   | Set disabled state                               |
| `error`            | `error`             | `boolean`        | false   | Set error state                                  |
| `hours`            | `hours`             | `number \| null` | null    | Hours time segment in 24hr format                |
| `minutes`          | `minutes`           | `number \| null` | null    | Minutes time segment                             |
| `readonly`         | `readonly`          | `boolean`        | false   | Set readonly state                               |
| `seconds`          | `seconds`           | `number \| null` | null    | Seconds time segment                             |
| `showSeconds`      | `show-seconds`      | `boolean`        | false   | Flag to show seconds time segment in display.<br />Seconds are automatically shown when `hh:mm:ss` time format is provided as a value. |
| `value`            | `value`             | `string`         | ""      | Current time value                               |

## Methods

| Method           | Type          | Description                                      |
|------------------|---------------|--------------------------------------------------|
| `checkValidity`  | `(): boolean` | Returns `true` if all input segments contain valid data or empty. Otherwise, returns false. |
| `reportValidity` | `(): boolean` | Validate input. Mark as error if input is invalid |
| `toggle`         | `(): void`    | Toggles the AM/PM state                          |

## Events

| Event           | Description                                      |
|-----------------|--------------------------------------------------|
| `error-changed` | Fired when user inputs invalid value. The event is not triggered if `error` property is changed programmatically. |
| `value-changed` | Fired when the user commits a value change. The event is not triggered if `value` property is changed programmatically. |
