forge icon indicating copy to clipboard operation
forge copied to clipboard

[date-picker] standardize and improve input masking

Open DRiFTy17 opened this issue 2 years ago • 0 comments

Describe the bug: The current input masking functionality does not provide a friendly UX in the date-picker component. It works well for certain input formats/patterns, but there are bugs in editing the value as well as coercion to assist the user as they type.

We can vastly improve the masking logic to make it easier to use and more familiar.

Expected behavior: Input masking functionality should be familiar and easy to use:

  • Allow for editing any segments of the date value without changes to other segments
  • Automatically infer leading zeros
  • Coerce "short" date formats such as "1/1/23" to expected values "01/01/2023"

Additional context: This relates to the time-picker as well, and should be consistent with the approach in that component. https://github.com/tyler-technologies-oss/forge/issues/228

DRiFTy17 avatar Feb 08 '23 20:02 DRiFTy17