Open Kevin-Carlos opened 4 years ago
Hi @Kevin-Carlos , you can overwrite ranges using staticRanges and inputRanges properties. For example, if you don't want any inputRange, just pass an empty array to that property:
<DateRangePicker
onChange={ (event) => { console.log(event) }}
ranges={[{selection:{}}]}
direction="horizontal"
inputRanges = {[]}
/>
See demo here. Through these properties you can also define custom ranges, using this file as an example.
@nerychucuy That is a solution, however, why doesn't it accept null as a value (Typescript)? Passing an empty array still renders the div of where the input ranges would be.
@Kevin-Carlos , that's a good point. Will see if I can work on a PR to address that.
inputRanges = {[]}
I used this approach to remove input ranges. It (partially) works, as the container (.rdrDefinedRangesWrapper
) still there and the space is affecting the rest of the style. Is there any way to also remove this container/wrapper?
Though, I simply use this workaround
.rdrDefinedRangesWrapper {
display: none;
}
Perhaps I'm missing something here, but nothing in the list of props appears to hide this and the 'days starting today' boxes.
If there isn't this would be a nice feature to have.