1

Wanting to leverage some of the built in functionality (date validation, etc) of react-day-picker while not offering the calendar overlay (offering the user an input field without the calendar overlay).

I'm not seeing any options in the docs to show only the input field without the calendar overlay.

Am I missing something?

sfletche
  • 47,248
  • 30
  • 103
  • 119

2 Answers2

2

Maybe a hacky way but I can see that you can provide custom prop classNames to the DayPickerInput component. Source

And you could provide an object like

<DayPickerInput>
    classNames={{
       overlayWrapper: 'myCustomClass'
    }}
/>

.myCustomClass {
    display: none;
}

or if you can hide the default class for the overlay wrapper

.DayPickerInput-OverlayWrapper {
    display: none!important;
}
ztadic91
  • 2,774
  • 1
  • 15
  • 21
0

Nope, looking into the source but it's open source. You can copy the file and remove the parts you don't need.

Sulthan
  • 128,090
  • 22
  • 218
  • 270