Date

A specialized date input component that provides a calendar interface for selecting dates. Supports customizable date formats, range validation, localization (multilingual), and custom validation rules. Features a user-friendly calendar picker interface and handles various date formats.


Extends: fieldComponent


Fields

Name

Code

Data Type

Description

Date Format

dateFormat

text

Specifies the format pattern for displaying and parsing dates

Date-Time Format

dateTimeFormat

text

Specifies the format pattern for date-time display and parsing

Min Allowed Value

minAllowedValue

text

Sets the earliest allowed date that can be selected

Max Allowed Value

maxAllowedValue

text

Sets the latest allowed date that can be selected

Custom Validation Script

customValidationScript

text

A custom JavaScript function for additional date validation rules

Custom Validation Message

customValidationMessage

multi-locale

The error message shown when custom date validation fails (Multi-lingual)

Unique

unique

boolean

When true, ensures the selected date doesn't duplicate existing dates in the system

Methods

Name

Description

optionsFn

Validates and filters selectable dates based on min and max allowed values

getRangeValues

Implements custom date range validation logic for selectable dates

fromValue

Converts input value to a formatted date string

toValue

Converts formatted date string to a Date object

getCustomLocale

Provides localized day and month names for different languages

Events

Name

Description

onChange

Triggered when the selected date is modified

onBlur

Triggered when the date input loses focus

onFocus

Triggered when the date input gains focus