Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document MaskedDateField component #355

Open
hyyan opened this issue Nov 29, 2024 · 0 comments
Open

Document MaskedDateField component #355

hyyan opened this issue Nov 29, 2024 · 0 comments

Comments

@hyyan
Copy link
Member

hyyan commented Nov 29, 2024

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.

    • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant