Skip to content

Issue 2810 fix #3119

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ exports[`Matches shallow shapshot 1`] = `
"calendarLabel": "Calendar",
"chooseAvailableEndDate": [Function],
"chooseAvailableStartDate": [Function],
"clearDate": "Clear Date",
"clearDates": "Clear Dates",
"closeDatePicker": "Close",
"dateIsSelected": [Function],
Expand All @@ -57,8 +58,8 @@ exports[`Matches shallow shapshot 1`] = `
"focusStartDate": "Interact with the calendar and add the check-in date for your trip.",
"hideKeyboardShortcutsPanel": "Close the shortcuts panel.",
"homeEnd": "Home and end keys",
"jumpToNextMonth": "Move forward to switch to the next month.",
"jumpToPrevMonth": "Move backward to switch to the previous month.",
"jumpToNextMonth": "Next Month",
"jumpToPrevMonth": "Previous Month",
"keyboardNavigationInstructions": "Press the down arrow key to interact with the calendar and
select a date. Press the question mark key to get the keyboard shortcuts for changing dates.",
"keyboardShortcuts": "Keyboard Shortcuts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'react-dates/initialize';
import { DateRangePicker as WrappedDateRangePicker } from 'react-dates';
import 'react-dates/lib/css/_datepicker.css';
import './_fix_DateInput__input.css';
import defaultPhrases from 'react-dates/lib/defaultPhrases';

class DateRangePicker extends React.Component {
constructor(props) {
Expand All @@ -37,6 +38,11 @@ class DateRangePicker extends React.Component {
const {
focusedInput,
} = this.state;
const phraseOverrides = {
...defaultPhrases,
jumpToPrevMonth: 'Previous Month',
jumpToNextMonth: 'Next Month',
};
return (
<WrappedDateRangePicker
hideKeyboardShortcutsPanel
Expand All @@ -52,6 +58,7 @@ class DateRangePicker extends React.Component {
anchorDirection="right"
displayFormat="MMM DD, YYYY"
readOnly={readOnly}
phrases={phraseOverrides}
/>
);
}
Expand Down