Skip to content

Commit

Permalink
feat: allow to override InputDate Popper.js props (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
FezVrasta authored Oct 7, 2019
1 parent 8c97269 commit f3d7a72
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/react-forms/src/InputDate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// @flow
import React, { useCallback, createRef } from 'react';
import parse from 'date-fns/parse';
import { Manager, Popper, Reference } from 'react-popper';
import { Manager, Popper, Reference, type PopperProps } from 'react-popper';
import InputText from '../InputText';
import Calendar from '@quid/react-date-picker';
import { Icon } from '@quid/react-core';
Expand All @@ -33,6 +33,7 @@ export type Props = {
disabled?: boolean,
onCalendarChange?: string => void,
calendarValue?: string,
popperProps?: PopperProps,
};

const InputDate = ({
Expand All @@ -45,6 +46,7 @@ const InputDate = ({
max,
onCalendarChange,
calendarValue,
popperProps,
...props
}: Props) => {
const inputRef = createRef();
Expand Down Expand Up @@ -149,7 +151,7 @@ const InputDate = ({
)}
</Reference>
{isOpen && (
<Popper placement="bottom">
<Popper placement="bottom" {...popperProps}>
{({ ref, style }) => (
<Calendar
onChangeCurrent={handleCurrentChange}
Expand Down

0 comments on commit f3d7a72

Please sign in to comment.