mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Update react-dates from 9 to 12. Fix for DOM change 'CalendarDay_button' and add new default props
This commit is contained in:
parent
928e863d8e
commit
4028f1ed8d
4 changed files with 19 additions and 4 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue