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 ariaLabelFormat Prop into CalendarDay component #842

Merged
merged 1 commit into from
Nov 28, 2017

Conversation

koba04
Copy link
Contributor

@koba04 koba04 commented Nov 14, 2017

This is a PR to fix #778.
I've added ariaLabelFormat for CalendarDay and added 'dayAriaLabelFormatforCalendarMonth, CalendarMonthGridandDayPickerto pass throughariaLabelFormat`

@@ -101,7 +104,7 @@ class CalendarDay extends React.Component {

if (!day) return <td />;

const formattedDate = { date: `${day.format('dddd')}, ${day.format('LL')}` };
Copy link
Member

Choose a reason for hiding this comment

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

hm, is there a reason that it was two separate format calls before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure... but the result is same.

@ljharb ljharb added the semver-minor: new stuff Any feature or API addition. label Nov 14, 2017
@coveralls
Copy link

Coverage Status

Coverage remained the same at 87.099% when pulling 5bea963 on koba04:add-day-aria-label-format into 55d6453 on airbnb:master.

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.

LGTM. You don't need this any higher up the tree beyond the DayPicker component?

@majapw majapw merged commit 6b0e9bb into react-dates:master Nov 28, 2017
@koba04
Copy link
Contributor Author

koba04 commented Nov 28, 2017

Thanks!
Currently, I'm using DayPicker directly, so I don't need that.
But it seems to make sense. I'll make a PR for that!

@koba04 koba04 deleted the add-day-aria-label-format branch November 28, 2017 01:51
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.

Localize aria-label for CalendarDay button
4 participants