Skip to content

getDatepickerFormat Type documentation

TypeScript declaration

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

Returns date / datetime format to be used for rendering a date object as text to an Html input element, which has the SiDatepickerDirective.

See: https://angular.dev/api/common/DatePipe?tab=usage-notes

Returns: Either

• a custom format provided by the config,

• the localized medium format when time and seconds included

• the localized short format when time and no seconds included

getDatepickerFormat(locale: string, config?: DatepickerInputConfig, timeWhenDisabled?: boolean = false): string

Returns date / datetime format to be used for rendering a date object as text to an Html input element, which has the SiDatepickerDirective.

See: https://angular.dev/api/common/DatePipe?tab=usage-notes

Returns: Either

• a custom format provided by the config,

• the localized medium format when time and seconds included

• the localized short format when time and no seconds included

Parameters

Types Documentation

import type { DatepickerInputConfig } from '@siemens/element-ng/datepicker';
Properties

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.

WeekStart

'monday' | 'saturday' | 'sunday' | undefined
type alias
import type { WeekStart } from '@siemens/element-ng/datepicker';

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


Except where otherwise noted, content on this site is licensed under MIT License.