Skip to content

Date Picker

Show design guidelines

Date pickers allow users to enter a date either through text input, or by choosing a date from the calendar.

HTML React Angular
<certara-input type="date" />
import { CertaraInput } from '@certara/certara-ui-react';
<CertaraInput type="date" />
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-input type="date"></certara-input>
HTML React Angular
<certara-form-group label="Select date" layout="stacked">
<certara-input type="date" />
</certara-form-group>
import { CertaraFormGroup, CertaraInput } from '@certara/certara-ui-react';
<CertaraFormGroup label="Select date" layout="stacked">
<CertaraInput type="date" />
</CertaraFormGroup>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-form-group label="Select date" layout="stacked">
<certara-input type="date"></certara-input>
</certara-form-group>

accept

Attributeaccept
Typestring
Defaultundefined
Requiredfalse
DescriptionAccepted file types for file inputs (e.g., “.pdf,.doc”).

disabled

Attributedisabled
Typeboolean
Defaultfalse
Requiredfalse
DescriptionPrevents user interaction.

max

Attributemax
Typenumber | string
Defaultundefined
Requiredfalse
DescriptionMaximum value for number/date inputs.

maxlength

Attributemaxlength
Typenumber
Defaultundefined
Requiredfalse
DescriptionMaximum number of characters allowed.

min

Attributemin
Typenumber | string
Defaultundefined
Requiredfalse
DescriptionMinimum value for number/date inputs.

minlength

Attributeminlength
Typenumber
Defaultundefined
Requiredfalse
DescriptionMinimum number of characters required.

name

Attributename
Typestring
Defaultthis.inputId
Requiredfalse
DescriptionForm control name, used for form submission and validation events.

pattern

Attributepattern
Typestring
Defaultundefined
Requiredfalse
DescriptionRegex pattern the value must match.

placeholder

Attributeplaceholder
Typestring
Defaultundefined
Requiredfalse
DescriptionPlaceholder text shown when empty.

readonly

Attributereadonly
Typeboolean
Defaultfalse
Requiredfalse
DescriptionPrevents editing while allowing selection and copy.

required

Attributerequired
Typeboolean
Defaultfalse
Requiredfalse
DescriptionMarks the field as required for form validation.

size

Attributesize
Type"md" | "sm"
Default'md'
Requiredfalse
DescriptionVisual size variant of the input.

step

Attributestep
Typenumber | string
Defaultundefined
Requiredfalse
DescriptionStep increment for number inputs.

type

Attributetype
Type"date" | "datetime-local" | "email" | "file" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "url"
Default'text'
Requiredfalse
DescriptionInput type, affects keyboard on mobile and validation.

value

Attributevalue
Typestring
Defaultundefined
Requiredfalse
DescriptionCurrent value of the input.
NameDescriptionBubbles
certaraBlurEmitted when the input loses focus.true
certaraChangeEmitted when value changes from the previous value.true
certaraFocusEmitted when the input gains focus.true
certaraFormControlErrorEmitted when validation state changes. Payload is the error message or empty string when valid.true
certaraInputEmitted on every keystroke.true
NameSignatureDescription
setBlur() => Promise<void>Programmatically blurs the input.
setError(error: string) => Promise<void>Sets a custom error message. This allows consumers to call input.setError('my error message') instead of input.setAttribute('error', 'my error message').
setFocus() => Promise<void>Programmatically focuses the input.
NameDescription
appendContent placed after the input (e.g., buttons, icons).
prependContent placed before the input (e.g., labels, icons).