diff --git a/x-pack/legacy/plugins/infra/public/pages/logs/analysis/setup/initial_configuration_step/analysis_setup_timerange_form.tsx b/x-pack/legacy/plugins/infra/public/pages/logs/analysis/setup/initial_configuration_step/analysis_setup_timerange_form.tsx index 8b3b0f2ed97c6..17f1aa48c87a2 100644 --- a/x-pack/legacy/plugins/infra/public/pages/logs/analysis/setup/initial_configuration_step/analysis_setup_timerange_form.tsx +++ b/x-pack/legacy/plugins/infra/public/pages/logs/analysis/setup/initial_configuration_step/analysis_setup_timerange_form.tsx @@ -6,6 +6,7 @@ import { EuiDatePicker, + EuiDatePickerProps, EuiDescribedFormGroup, EuiFlexGroup, EuiFormControlLayout, @@ -85,18 +86,13 @@ export const AnalysisSetupTimerangeForm: React.FunctionComponent<{ setStartTime(undefined) } : undefined} > - - {popperClassName => ( - setStartTime(selectedDateToParam(date))} - placeholder={startTimeDefaultDescription} - popperClassName={popperClassName} - maxDate={now} - /> - )} - + setStartTime(selectedDateToParam(date))} + placeholder={startTimeDefaultDescription} + maxDate={now} + /> @@ -111,29 +107,24 @@ export const AnalysisSetupTimerangeForm: React.FunctionComponent<{ setEndTime(undefined) } : undefined} > - - {popperClassName => ( - setEndTime(selectedDateToParam(date))} - placeholder={endTimeDefaultDescription} - openToDate={now} - minDate={startTimeValue} - minTime={ - selectedEndTimeIsToday - ? now - : moment() - .hour(0) - .minutes(0) - } - maxTime={moment() - .hour(23) - .minutes(59)} - popperClassName={popperClassName} - /> - )} - + setEndTime(selectedDateToParam(date))} + placeholder={endTimeDefaultDescription} + openToDate={now} + minDate={startTimeValue} + minTime={ + selectedEndTimeIsToday + ? now + : moment() + .hour(0) + .minutes(0) + } + maxTime={moment() + .hour(23) + .minutes(59)} + /> @@ -141,14 +132,17 @@ export const AnalysisSetupTimerangeForm: React.FunctionComponent<{ ); }; -const WithFixedDatepickerZIndex = euiStyled( +const FixedDatePicker = euiStyled( ({ - children, className, + inputClassName, + ...datePickerProps }: { - children: (className?: string) => React.ReactElement; className?: string; - }) => children(className) + inputClassName?: string; + } & EuiDatePickerProps) => ( + + ) )` z-index: 3 !important; `;