# SiDatepickerComponent documentation

**Kind:** component

**Selector:** `si-datepicker`

```
import { SiDatepickerComponent } from '@siemens/element-ng/datepicker';
```

```
component SiDatepickerComponent implements OnInit, OnChanges, AfterViewInit
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [calendarWeekLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L148-L150>) | `TranslatableString` | `` $localize`:@@SI_DATEPICKER.CALENDAR_WEEK_LABEL:Calendar week` `` | Aria label for week number column |
| [config](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L119-L119>) | `DatepickerConfig` | `{}` | Object to configure the datepicker. |
| [date](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L87-L87>) | `Date \| undefined` |  | The selected date of the datepicker. Use for initialization and for bidirectional binding. |
| [dateRange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L92-L92>) | `DateRange \| undefined` |  | The selected date range of the datepicker. Use for initialization and for bidirectional binding. |
| [disabledTime](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L110-L110>) | `boolean` | `false` | Disabled the optional visible time picker. |
| [focusedDate](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L82-L82>) | `Date \| undefined` |  | The date which is currently focused Compare to the selected date or range the calendar requires to have one element to focus. |
| [hideTimeToggle](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L187-L187>) | `boolean` | `false` | Option to hide the time switch. |
| [initialFocus](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L104-L104>) | `boolean` | `false` | Set initial focus to calendar body. |
| [nextLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L139-L139>) | `TranslatableString` | `` $localize`:@@SI_DATEPICKER.NEXT:Next` `` | Aria label for the next button. Needed for a11y. |
| [previousLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L128-L130>) | `TranslatableString` | `` $localize`:@@SI_DATEPICKER.PREVIOUS:Previous` `` | Aria label for the previous button. Needed for a11y. |
| [rangeType](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L164-L164>) | `RangeType` | `'START'` | Use this to force date range operation to select either start date or end date. |
| [time12h](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L156-L158>) | `boolean` | `undefined` | Enable/disable 12H mode in timepicker. Defaults to locale |
| [timepickerLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L197-L197>) | `string \| undefined` |  | Optional timepicker label. |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [configChange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L119-L119>) | `DatepickerConfig` | Object to configure the datepicker. |
| [dateChange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L87-L87>) | `Date \| undefined` | The selected date of the datepicker. Use for initialization and for bidirectional binding. |
| [dateRangeChange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L92-L92>) | `DateRange \| undefined` | The selected date range of the datepicker. Use for initialization and for bidirectional binding. |
| [disabledTimeChange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L110-L110>) | `boolean` | Disabled the optional visible time picker. |
| [focusedDateChange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L82-L82>) | `Date \| undefined` | The date which is currently focused Compare to the selected date or range the calendar requires to have one element to focus. |
| [rangeTypeChange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L164-L164>) | `RangeType` | Use this to force date range operation to select either start date or end date. |

#### Attributes and Methods

##### focusActiveCell

[Source for focusActiveCell](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L664-L666>)

Focus the active cell in view. The function is required to transfer the focus from input to the active date cell.

```
focusActiveCell(): void
```

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

### Types Documentation

### [DatepickerConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L11-L104>)

**Kind:** interface

```
import type { DatepickerConfig } from '@siemens/element-ng/datepicker';
```

```
interface DatepickerConfig
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [disabledTime](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L48-L48>) (optional) | `boolean` | Defines the time is disabled when visible. Will also be updated on user change. Default is `false`. |
| [disabledTimeText](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L56-L56>) (optional) | `TranslatableString` | Text or translation key for the `disabled` disable time. Default is `Ignore time`. |
| [enableDateRange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L68-L68>) (optional) | `boolean` | Options to turn on date range selection. |
| [enabledTimeText](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L52-L52>) (optional) | `TranslatableString` | Text or translation key for the `enabled` disable time. Default is `Consider time`. |
| [enableTimeValidation](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L76-L76>) (optional) | `boolean` | Consider time with minDate and maxDate |
| [enableTwoMonthDateRange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L72-L72>) (optional) | `boolean` | Option to use two months view for date range picking. |
| [endTimeLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L103-L103>) (optional) | `string` |  |
| [hideLabels](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L86-L86>) (optional) | `boolean` |  |
| [hideWeekNumbers](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L23-L23>) (optional) | `boolean` | Configuration for hiding week numbers. Default is `false`. |
| [hoursAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L88-L88>) (optional) | `string` |  |
| [hoursLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L82-L82>) (optional) | `string` |  |
| [hoursPlaceholder](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L93-L93>) (optional) | `string` |  |
| [mandatoryTime](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L44-L44>) (optional) | `boolean` | Hides disable time switch in the timepicker part and includes mandatory the time in the picker. |
| [maxDate](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L64-L64>) (optional) | `Date` | Maximal (latest) selectable date. |
| [meridians](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L98-L98>) (optional) | `string[]` |  |
| [meridiansAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L100-L100>) (optional) | `string` |  |
| [meridiansLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L99-L99>) (optional) | `string` |  |
| [millisecondsAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L91-L91>) (optional) | `string` |  |
| [millisecondsLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L85-L85>) (optional) | `string` |  |
| [millisecondsPlaceholder](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L96-L96>) (optional) | `string` |  |
| [minDate](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L60-L60>) (optional) | `Date` | Minimal (earliest) selectable date. |
| [minutesAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L89-L89>) (optional) | `string` |  |
| [minutesLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L83-L83>) (optional) | `string` |  |
| [minutesPlaceholder](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L94-L94>) (optional) | `string` |  |
| [onlyMonthSelection](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L80-L80>) (optional) | `boolean` | Only month and year are selectable. |
| [secondsAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L90-L90>) (optional) | `string` |  |
| [secondsLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L84-L84>) (optional) | `string` |  |
| [secondsPlaceholder](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L95-L95>) (optional) | `string` |  |
| [showMilliseconds](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L39-L39>) (optional) | `boolean` | Defines the timepicker milliseconds visibility . Default is `false`. |
| [showMinutes](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L31-L31>) (optional) | `boolean` | Defines the timepicker minutes visibility. Default is `true`. |
| [showSeconds](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L35-L35>) (optional) | `boolean` | Defines the timepicker seconds visibility . Default is `false`. |
| [showTime](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L27-L27>) (optional) | `boolean` | Defines the timepicker visibility. Default is `false`. |
| [startTimeLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L102-L102>) (optional) | `string` |  |
| [todayText](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L15-L15>) (optional) | `TranslatableString` | Text or translation key for today button title. Default is `Today`. |
| [weekStartDay](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L19-L19>) (optional) | `WeekStart` | Defines the starting day of the week. Default is `monday`. |

### [DateRange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L170-L173>)

**Kind:** type alias

```
import type { DateRange } from '@siemens/element-ng/datepicker';
```

```
type DateRange = {
  start: Date | undefined;
  end: Date | undefined;
}
```

### [RangeType](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.component.ts#L60-L60>)

**Kind:** type alias

```
import type { RangeType } from '@siemens/element-ng/datepicker';
```

```
type RangeType = 'START' | 'END' | undefined
```

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```

### [WeekStart](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L9-L9>)

**Kind:** type alias

```
import type { WeekStart } from '@siemens/element-ng/datepicker';
```

```
type WeekStart = 'monday' | 'saturday' | 'sunday' | undefined
```
