granularity prop type on DateField component doesn't allow "month"? #8065
Unanswered
DarkstarXDD
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, i have a form input where the user is only needed to enter the month and year. By default the
DateField
component allows month, day and year. I thought i would be able to remove the date segment by setting thegranularity
prop to "month". So it will only be month and year. While this works and the date gets removed from the input, it seems theGranularity
type only allows either one of these values 'day' | 'hour' | 'minute' | 'second'.https://react-spectrum.adobe.com/react-aria/DateField.html#granularity
So my question is am i trying to use this
DateField
component in an abnormal way? Or is there any other way i can limit the inputs to only accept month and year and exclude the day?Beta Was this translation helpful? Give feedback.
All reactions