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

Commit 039fa20

Browse files
Shammamah HossainRyan Patrick Kyle
Shammamah Hossain
authored and
Ryan Patrick Kyle
committed
Update CSS for DatePickerRange vertical arrows. (#699)
* Update CSS for DatePickerRange vertical arrows. * Use day size to calculate vertical height. * Fix eslint error.
1 parent f682ee9 commit 039fa20

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

src/components/css/[email protected]

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
.DateInput_input {
22
box-sizing: border-box;
3-
}
3+
}
4+
5+
.DayPickerNavigation__verticalDefault {
6+
text-align: center;
7+
height: initial;
8+
padding: 10px 0px;
9+
}
10+
11+
.DayPickerNavigation_svg__vertical {
12+
height: 20px;
13+
}

src/fragments/DatePickerRange.react.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ export default class DatePickerRange extends Component {
135135
...style,
136136
};
137137

138+
// the height in px of the top part of the calendar (that holds
139+
// the name of the month)
140+
const baselineHeight = 145;
141+
138142
return (
139143
<div
140144
id={id}
@@ -184,6 +188,7 @@ export default class DatePickerRange extends Component {
184188
withPortal={with_portal && verticalFlag}
185189
startDateId={start_date_id || this.state.start_date_id}
186190
endDateId={end_date_id || this.state.end_date_id}
191+
verticalHeight={baselineHeight + day_size * 6 + 'px'}
187192
/>
188193
</div>
189194
);

src/fragments/DatePickerSingle.react.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ export default class DatePickerSingle extends Component {
7171
...style,
7272
};
7373

74+
// the height in px of the top part of the calendar (that holds
75+
// the name of the month)
76+
const baselineHeight = 145;
77+
7478
return (
7579
<div
7680
id={id}
@@ -106,6 +110,7 @@ export default class DatePickerSingle extends Component {
106110
isRTL={is_RTL}
107111
orientation={calendar_orientation}
108112
daySize={day_size}
113+
verticalHeight={baselineHeight + day_size * 6 + 'px'}
109114
/>
110115
</div>
111116
);

0 commit comments

Comments
 (0)