import { KbqDatetimeModule } from '@koobiq/components/datetime';

KbqDatetime

componentСкопировать ссылку на KbqDatetime

A date and a time in one form field: a date input with a calendar and a time input that share one value.

The value is a date of the date adapter, and it is null until both parts are filled in.

@Component({ selector: 'kbq-datetime', exportAs: 'kbqDatetime' })
class KbqDatetime<D> implements KbqFormFieldControl<D>, ControlValueAccessor, Validator {
    readonly errorStateMatcher = input<ErrorStateMatcher>();
    readonly required = input<boolean>(false);
    readonly id = input<string | undefined>();
    readonly disabled = input<boolean>(false);
    readonly format = input<TimeFormats>(DEFAULT_TIME_FORMAT);
    readonly min = input<D | null>(null);
    readonly max = input<D | null>(null);
    readonly value: Signal<D | null>;
    readonly datepicker: Signal<KbqDatepicker<D>>;
    focus(options?: FocusOptions): void;
    open(): void;
    close(): void;
}
errorStateMatcherinputСкопировать ссылку на errorStateMatcherErrorStateMatcher

Object used to control when error messages are shown.

requiredinputСкопировать ссылку на requiredboolean

Whether the control is required. Defaults to false.

idinputСкопировать ссылку на idstring | undefined

Unique id of the element, generated when not provided.

disabledinputСкопировать ссылку на disabledboolean

Whether the control is disabled. Also set by the bound form control. Defaults to false.

formatinputСкопировать ссылку на formatTimeFormats

Time format the time part parses and renders. Defaults to TimeFormats.HHmm.

mininputСкопировать ссылку на minD | null

Earliest date and time the control accepts, reported as kbqDatetimeMin. The calendar disables the days before it. Defaults to null.

maxinputСкопировать ссылку на maxD | null

Latest date and time the control accepts, reported as kbqDatetimeMax. The calendar disables the days after it. Defaults to null.

valueСкопировать ссылку на valueSignal<D | null>

The date and time the control holds, null until both parts are filled in.

datepickerСкопировать ссылку на datepickerSignal<KbqDatepicker<D>>

The calendar of the date part, for a kbq-datepicker-toggle-icon placed in the form field.

focus()Скопировать ссылку на focus()void

Focuses the first part left empty, the date part when there is none.

KBQ_DATETIME_MAX_ERROR

constСкопировать ссылку на KBQ_DATETIME_MAX_ERROR

Key of the error KbqDatetime reports for a value after its max.

const KBQ_DATETIME_MAX_ERROR: string;

KBQ_DATETIME_MIN_ERROR

constСкопировать ссылку на KBQ_DATETIME_MIN_ERROR

Key of the error KbqDatetime reports for a value before its min.

const KBQ_DATETIME_MIN_ERROR: string;

KBQ_DATETIME_PARSE_ERROR

constСкопировать ссылку на KBQ_DATETIME_PARSE_ERROR

Key of the error KbqDatetime reports for a text that is not a date and time, or for a single part filled in.

const KBQ_DATETIME_PARSE_ERROR: string;
Предложения по улучшению
Если вы нашли ошибку или хотите доработать статью, создайте запрос на GitHub.