Update react-dates from 9 to 12. Fix for DOM change 'CalendarDay_button' and add new default props

This commit is contained in:
Vesa Luusua 2017-10-16 19:30:15 +03:00 committed by Kimmo Puputti
parent 928e863d8e
commit 4028f1ed8d
4 changed files with 19 additions and 4 deletions

View file

@ -12,7 +12,7 @@ exports[`DateInput matches snapshot 1`] = `
className="SingleDatePickerInput"
>
<div
className="DateInput"
className="DateInput DateInput--open-down"
>
<input
aria-describedby="DateInput__screen-reader-message-date-input"

View file

@ -79,6 +79,13 @@
& :global(.DayPickerNavigation__prev),
& :global(.DayPickerNavigation__next) {
color: var(--matterColorLight);
border: 0;
}
& :global(.CalendarDay__button) {
border: 0;
padding: 0;
width: 100%;
height: 100%;
}
& :global(.CalendarDay) {
@apply --marketplaceH4FontStyles;

View file

@ -40,6 +40,7 @@ const defaultProps = {
endDatePlaceholderText: null, // Handled inside component
disabled: false,
required: false,
readOnly: false,
screenReaderInputMessage: null, // Handled inside component
showClearDates: false,
showDefaultInputIcon: false,
@ -48,17 +49,21 @@ const defaultProps = {
customCloseIcon: null,
// calendar presentation and interaction related props
renderMonth: null,
orientation: HORIZONTAL_ORIENTATION,
anchorDirection: ANCHOR_LEFT,
horizontalMargin: 0,
withPortal: false,
withFullScreenPortal: false,
daySize: 38,
isRTL: false,
initialVisibleMonth: null,
firstDayOfWeek: 0, // 0 .. 6, 0 is Sunday. TODO: This should come from some localization config.
numberOfMonths: 1,
keepOpenOnDateSelect: false,
reopenPickerOnClearDates: false,
renderCalendarInfo: null,
daySize: 38,
hideKeyboardShortcutsPanel: true,
// navigation related props
navPrev: <PreviousMonthIcon />,
@ -91,6 +96,7 @@ const defaultProps = {
// https://momentjs.com/
displayFormat: 'ddd, MMMM D',
monthFormat: 'MMMM YYYY',
weekDayFormat: 'dd',
phrases: {
closeDatePicker: null, // Handled inside component
clearDate: null, // Handled inside component

View file

@ -12,7 +12,7 @@ exports[`DateRangeInput matches snapshot 1`] = `
className="DateRangePickerInput"
>
<div
className="DateInput"
className="DateInput DateInput--open-down"
>
<input
aria-describedby="DateInput__screen-reader-message-bookingStartDate"
@ -44,12 +44,14 @@ exports[`DateRangeInput matches snapshot 1`] = `
</div>
</div>
<div
aria-hidden="true"
className="DateRangePickerInput__arrow"
role="presentation"
>
<span />
</div>
<div
className="DateInput"
className="DateInput DateInput--open-down"
>
<input
aria-describedby="DateInput__screen-reader-message-bookingEndDate"