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

Add dayAriaLabelFormat into DatePickerRange and SingleDatePicker #984

Merged
merged 4 commits into from
Apr 5, 2018

Conversation

koba04
Copy link
Contributor

@koba04 koba04 commented Jan 27, 2018

This PR is a follow-up for #857 (comment)

I've add dayAriaLabelFormat into DatePickerRange and SingleDatePicker and have mentioned in README.

@coveralls
Copy link

coveralls commented Jan 27, 2018

Coverage Status

Coverage remained the same at 86.513% when pulling b97db46 on koba04:more-day-aria-label-format into 3c75774 on airbnb:master.

@ljharb ljharb added the semver-minor: new stuff Any feature or API addition. label Jan 27, 2018
Copy link
Collaborator

@majapw majapw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good after we add defaultProp values for the dayAriaLabelFormat prop on the SDP and DRP. Thanks for doing this!

@@ -335,6 +335,7 @@ class DateRangePicker extends React.Component {
customCloseIcon,
onClose,
phrases,
dayAriaLabelFormat,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a defaultProp value for this one

@@ -364,6 +364,7 @@ class SingleDatePicker extends React.Component {
firstDayOfWeek,
customCloseIcon,
phrases,
dayAriaLabelFormat,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a defaultProp value for this one

@koba04
Copy link
Contributor Author

koba04 commented Feb 2, 2018

@majapw
I've added defaultProp for dayAriaLabelFormat.
But I didn't add defaultProp for dayAriaLabelFormat to components I've added dayAriaLabelFormat because dayAriaLabelFormat is passed as a ariaLabelFormat prop of CalendarDay.
ariaLabelFormat has a defaultProp(dddd, LL) so I thought defaultProp for dayAriaLabelFormat isn't necessary.

Should I add defaultProp for dayAriaLabelFormat in other components(e.g. CalendarMonth, CalendarMonthGrid, DayPicker, DayPickerRangeController and DayPickerSingleDateController)?

@majapw
Copy link
Collaborator

majapw commented Feb 2, 2018

@koba04 it would be good to be explicit, so in the case of CalendarMonth, CalendarMonthGrid, DayPicker, DayPickerRangeController and DayPickerSingleDateController... we don't need a defaultProp value of "dddd, LL", but I would still put in a defaultProp value of undefined.

@koba04
Copy link
Contributor Author

koba04 commented Feb 3, 2018

@majapw That makes sense. I've fixed it. Thank you!

so in the case of CalendarMonth, CalendarMonthGrid, DayPicker, DayPickerRangeController and DayPickerSingleDateController...

I'll fix it as another PR.

@koba04
Copy link
Contributor Author

koba04 commented Feb 3, 2018

CI was failed due to #995

Copy link
Collaborator

@erin-doyle erin-doyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koba04 thanks for adding this!

@majapw majapw merged commit 2ca6470 into react-dates:master Apr 5, 2018
@koba04
Copy link
Contributor Author

koba04 commented Apr 6, 2018

Thanks!

@koba04 koba04 deleted the more-day-aria-label-format branch April 6, 2018 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor: new stuff Any feature or API addition.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants