feat(#782): add support for "month-year" and "year" appearances#786
feat(#782): add support for "month-year" and "year" appearances#786latin-panda merged 6 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 2d1a5cc The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| // PrimeVue has its date format convention, for example, 'yy' = 4-digit year | ||
| const pickerConfig = computed(() => { | ||
| if (isMonthYear.value) { | ||
| return { view: 'month', dateFormat: 'MM yy', placeholder: '' }; |
There was a problem hiding this comment.
Users can type a value:
-
month-year: They must enter the full month name in the locale, space, and then the year, as required by PrimeVue. I'm open to suggestions for a suitable placeholder text (it's empty for now) I was trying to avoid adding anything too technical or anything that would require translation. -
year: Just typing 4-digit year.
There was a problem hiding this comment.
If we can't come up with anything better I'd use the dateFormat as the placeholder, eg: MM yyyy or maybe mmm yyyy. I don't know how widely it's understood but if you know what it means it's really helpful and doesn't need translation.
There was a problem hiding this comment.
I've set: mmm yyyy
|
@garethbowen, This is ready for review. Could you please have a look? It's a small one. |
Closes #782
I have verified this PR works in these browsers (latest versions):
What else has been done to verify that this works as intended?
date-appearances.mp4
Why is this the best possible solution? Were any other approaches considered?
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
Do we need any specific form for testing your changes? If so, please attach one.
What's changed
month-yearandyearappearances.month-yearappearance sets the value at the start of the month. Whileyearat the start of the year.