Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Update CSS for DatePickerRange vertical arrows. #699

Merged
merged 6 commits into from
Nov 21, 2019
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
12 changes: 11 additions & 1 deletion src/components/css/[email protected]
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.DateInput_input {
box-sizing: border-box;
}
}

.DayPickerNavigation__verticalDefault {
text-align: center;
height: initial;
padding: 10px 0px;
}
Copy link
Contributor

@Marc-Andre-Rivet Marc-Andre-Rivet Nov 19, 2019

Choose a reason for hiding this comment

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

Adding box-sizing: border-box; will take the border width into account when calculating the default 50% size for the buttons, resulting in arrows being side by side.

image


.DayPickerNavigation_svg__vertical {
height: 20px;
}
5 changes: 5 additions & 0 deletions src/fragments/DatePickerRange.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ export default class DatePickerRange extends Component {
...style,
};

// the height in px of the top part of the calendar (that holds
// the name of the month)
const baselineHeight = 145;

return (
<div
id={id}
Expand Down Expand Up @@ -184,6 +188,7 @@ export default class DatePickerRange extends Component {
withPortal={with_portal && verticalFlag}
startDateId={start_date_id || this.state.start_date_id}
endDateId={end_date_id || this.state.end_date_id}
verticalHeight={baselineHeight + day_size * 6 + 'px'}
/>
</div>
);
Expand Down
5 changes: 5 additions & 0 deletions src/fragments/DatePickerSingle.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ export default class DatePickerSingle extends Component {
...style,
};

// the height in px of the top part of the calendar (that holds
// the name of the month)
const baselineHeight = 145;

return (
<div
id={id}
Expand Down Expand Up @@ -106,6 +110,7 @@ export default class DatePickerSingle extends Component {
isRTL={is_RTL}
orientation={calendar_orientation}
daySize={day_size}
verticalHeight={baselineHeight + day_size * 6 + 'px'}
/>
</div>
);
Expand Down