You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MaskedDateField is a text field that allows users to enter dates as numbers and automatically formats them according to a specified mask when the user exits the field. The mask is a string that defines the format of the date, enabling the field to interpret and display a human-readable string representation of the date.
Features (The order is arbitrary):
Parsing and Formatting Dates
The field parses and formats dates based on the defined mask, ensuring consistency in input and output formats.
Supported Masks
A variety of date formats are supported, which can be tailored to meet specific application requirements.
Value Representation
The value is internally represented as a LocalDate.
When the setText method is used to set the field's value, the component attempts to parse the text as a LocalDate based on the defined mask.
Minimum and Maximum Values
The MaskedDateField can enforce minimum and maximum allowable date values.
Date Picker Integration
A built-in date picker provides a user-friendly alternative for date selection.
Locale Support
Locale-specific formatting ensures that dates are presented in a way that is familiar to the user.
Client-Side Validation
Patterns and validation rules allow for robust client-side validation to ensure valid input.
Custom Values
Entering custom values can be disabled, requiring the user to select a value using the picker.
Restore Method
It is the text that appears when the user hits the restore key (usually ESC) or by calling the restoreValue() method
The text was updated successfully, but these errors were encountered:
See #356
The
MaskedDateField
is a text field that allows users to enter dates as numbers and automatically formats them according to a specified mask when the user exits the field. The mask is a string that defines the format of the date, enabling the field to interpret and display a human-readable string representation of the date.Features (The order is arbitrary):
Parsing and Formatting Dates
The field parses and formats dates based on the defined mask, ensuring consistency in input and output formats.
Supported Masks
A variety of date formats are supported, which can be tailored to meet specific application requirements.
Value Representation
The value is internally represented as a
LocalDate
.setText
method is used to set the field's value, the component attempts to parse the text as aLocalDate
based on the defined mask.Minimum and Maximum Values
The
MaskedDateField
can enforce minimum and maximum allowable date values.Date Picker Integration
A built-in date picker provides a user-friendly alternative for date selection.
Locale Support
Locale-specific formatting ensures that dates are presented in a way that is familiar to the user.
Client-Side Validation
Patterns and validation rules allow for robust client-side validation to ensure valid input.
Custom Values
Entering custom values can be disabled, requiring the user to select a value using the picker.
Restore Method
It is the text that appears when the user hits the restore key (usually ESC) or by calling the
restoreValue()
methodThe text was updated successfully, but these errors were encountered: