Skip to content

Remove 'days up to today' on DefinedRange/DateRangePicker #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Kevin-Carlos opened this issue Apr 8, 2020 · 4 comments
Open

Remove 'days up to today' on DefinedRange/DateRangePicker #362

Kevin-Carlos opened this issue Apr 8, 2020 · 4 comments

Comments

@Kevin-Carlos
Copy link

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.

@nerycordova
Copy link

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.

@Kevin-Carlos
Copy link
Author

@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.

@nerycordova
Copy link

nerycordova commented Apr 25, 2020

@Kevin-Carlos , that's a good point. Will see if I can work on a PR to address that.

@restuarifp
Copy link

restuarifp commented Apr 30, 2021

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants