dynamic-forms-primeng / Class

PrimeDatepickerControlComponent

Decorators:@Component
Selectors:df-prime-datepicker-control
Implements:FormValueControl<string | null>

A wrapper component for PrimeNG's DatePicker that implements FormValueControl. This allows it to work with Angular's [formField] directive from @angular/forms/signals.

The value is stored as an ISO date string for consistency with other implementations.

Constructor

No documentation has been provided.

Presentation

Properties

NameTypeDescription
ariaDescribedBy
r
InputSignal<string | null>

aria-describedby IDs passed from parent

ariaInvalid
r
InputSignal<boolean>

aria-invalid passed from parent (computed from field state)

ariaRequired
r
InputSignal<boolean | null>

aria-required passed from parent (computed from field state)

dateFormat
r
InputSignal<string>
dateValue
p r
Signal<Date | null>

Converts the string value to Date for PrimeNG's ngModel

defaultDate
r
InputSignal<Date | null>
disabled
r
implements FormUiControl
InputSignal<boolean>

Whether the field is disabled

inline
r
InputSignal<boolean>
inputId
r
InputSignal<string>
invalid
r
implements FormUiControl
InputSignal<boolean>

Whether the field is invalid (from FormField directive)

maxDate
r
InputSignal<Date | null>
meta
r
InputSignal<InputMeta | undefined>
minDate
r
InputSignal<Date | null>
placeholder
r
InputSignal<string>
readonly
r
implements FormUiControl
InputSignal<boolean>

Whether the field is readonly

required
r
implements FormUiControl
InputSignal<boolean>

Whether the field is required (from FormField directive)

selectionMode
r
InputSignal<"range" | "single" | "multiple">
showButtonBar
r
InputSignal<boolean>
showIcon
r
InputSignal<boolean>
styleClass
r
InputSignal<string>
tabIndex
r
InputSignal<number | undefined>
touched
r
implements FormUiControl
ModelSignal<boolean>

Tracks whether the field has been touched - used by FormField directive

touchUI
r
InputSignal<boolean>
value
r
implements FormValueControl
ModelSignal<string | null>

The value of the datepicker as ISO string - required by FormValueControl

view
r
InputSignal<"date" | "month" | "year">

Methods

onBlur()

Marks the field as touched when datepicker loses focus

Presentation
onBlur(): void;
Returns
void

onClear()

Handles clear action from DatePicker

Presentation
onClear(): void;
Returns
void

onModelChange()

Handles ngModel changes (from typing or calendar selection)

Presentation
onModelChange(date: Date | null): void;
Parameters
NameTypeDescription
date
Date | null
Returns
void

onSelect()

Handles date selection from DatePicker calendar - converts Date to ISO string

Presentation
onSelect(event: Date): void;
Parameters
NameTypeDescription
event
Date
Returns
void