-
Notifications
You must be signed in to change notification settings - Fork 0
Added textual date parsing section. #676
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| ### Day name decoration {#day-name-decoration} | ||
|
|
||
| Day-of-week names can be included in the input for better readability, but they are **decorative only** and are stripped during parsing. They don't affect the actual date value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [vale] reported by reviewdog 🐶
[Google.Contractions] Use 'they're' instead of 'they are'.
|
|
||
| ### When disabled (default) | ||
|
|
||
| If textual date parsing is **not** enabled (the default behavior), text names will not be recognized: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [vale] reported by reviewdog 🐶
[Google.Contractions] Use 'isn't' instead of 'is not'.
|
|
||
| ### When disabled (default) | ||
|
|
||
| If textual date parsing is **not** enabled (the default behavior), text names will not be recognized: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [vale] reported by reviewdog 🐶
[Google.Contractions] Use 'won't' instead of 'will not'.
|
|
||
| ## Textual date parsing {#textual-date-parsing} | ||
|
|
||
| By default, the `MaskedDateField` only accepts numeric input for dates. However, you can enable **textual date parsing** to allow users to enter month and day names in their input. This feature is particularly useful for creating more natural date entry experiences. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove "experiences" at the end, and just end with "entry".
|
|
||
| #### Examples | ||
|
|
||
| | Mask | Input | Result | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all of the tables, please remove the check emojis at the end
| | `%Dz/%Ml/%Yz` | `01/September/25` | ✅ Valid - Parses as September 1, 2025 | | ||
| | `%Ms/%Dz/%Yz` | `09/01/25` | ✅ Valid - Numeric fallback still works | | ||
|
|
||
| All 12 months are supported in both short (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec) and long (January, February, etc.) forms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a good candidate for a tip
No description provided.