File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
src/Shared/Components/DatePicker Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ const DateTimePicker = ({
50
50
isTodayBlocked = false ,
51
51
dataTestIdForTime = DATE_PICKER_IDS . TIME ,
52
52
dataTestidForDate = DATE_PICKER_IDS . DATE ,
53
+ openDirection = 'down' ,
53
54
} : DateTimePickerProps ) => {
54
55
const time = getTimeValue ( dateObject )
55
56
const selectedTimeOption = DEFAULT_TIME_OPTIONS . find ( ( option ) => option . value === time ) ?? DEFAULT_TIME_OPTIONS [ 0 ]
@@ -84,7 +85,7 @@ const DateTimePicker = ({
84
85
focused = { isFocused }
85
86
onFocusChange = { handleFocusChange }
86
87
numberOfMonths = { 1 }
87
- openDirection = "down"
88
+ openDirection = { openDirection }
88
89
renderCalendarDay = { ( props ) => < CustomizableCalendarDay { ...props } { ...customDayStyles } /> }
89
90
hideKeyboardShortcutsPanel
90
91
withFullScreenPortal = { false }
@@ -96,6 +97,7 @@ const DateTimePicker = ({
96
97
data-testid = { dataTestidForDate }
97
98
isDayBlocked = { isDayBlocked }
98
99
disabled = { disabled }
100
+ appendToBody
99
101
/>
100
102
{ ! hideTimeSelect && (
101
103
< div className = "dc__no-shrink" >
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- .date-time-picker {
18
- .DayPicker__horizontal {
19
- position : fixed !important ;
20
- }
17
+ .SingleDatePicker_picker {
18
+ z-index : calc (var (--modal-index ) + 1 ) !important ;
19
+ }
21
20
21
+ .date-time-picker {
22
22
.SingleDatePicker {
23
23
width : 100% ;
24
24
}
Original file line number Diff line number Diff line change 16
16
17
17
import { Moment } from 'moment'
18
18
import { SelectInstance } from 'react-select'
19
+ import { SingleDatePickerShape } from 'react-dates'
19
20
import { OptionType } from '../../../Common'
20
21
21
22
export interface SingleDatePickerProps {
@@ -100,10 +101,8 @@ export interface TimeSelectProps {
100
101
}
101
102
102
103
export interface DateTimePickerProps
103
- extends Pick <
104
- TimeSelectProps ,
105
- 'date' | 'onChange' | 'timePickerProps' | 'error' | 'disabled' | 'dataTestIdForTime'
106
- > {
104
+ extends Pick < TimeSelectProps , 'date' | 'onChange' | 'timePickerProps' | 'error' | 'disabled' | 'dataTestIdForTime' > ,
105
+ Pick < SingleDatePickerShape , 'openDirection' > {
107
106
/**
108
107
* Props for the date picker
109
108
*/
You can’t perform that action at this time.
0 commit comments