# Datetime

- Entry point: `@koobiq/components/datetime`
- NgModule: `KbqDatetimeModule`
- API: https://koobiq.io/api/datetime.md
- Page: https://koobiq.io/en/components/datetime/overview

KbqDatetime is a component for entering a date and a time in one field, with the data stored as one value.

[**Example: Datetime** (`datetime-overview`)](https://koobiq.io/examples/datetime-overview.md)

## Seconds

The time format with seconds is set with the `format` property.

[**Example: Datetime with seconds** (`datetime-with-seconds`)](https://koobiq.io/examples/datetime-with-seconds.md)

## Validation

The `min` and `max` properties bound the value together with the time and disable the days of the calendar outside the bounds.

[**Example: Datetime validation** (`datetime-validation`)](https://koobiq.io/examples/datetime-validation.md)

## Keyboard

After the last digit of the date is typed, the focus moves to the hours by itself.

| Key       | Action                                                               |
| --------- | -------------------------------------------------------------------- |
| ↓ ↑       | Decrease or increase the selected part of the date or the time by 1  |
| →         | Go to the next part, from the last part of the date to the hours     |
| ←         | Go to the previous part, from the hours to the last part of the date |
| Backspace | Delete a character, in an empty time input go to the date            |
| Alt + ↓   | Open the calendar from the date input                                |
| Esc       | Close the calendar                                                   |
