question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom filter with Date Picker

See original GitHub issue

I am creating a custom Filter that will show a classic Date Picker. However the Rendering of the popover is wrong/not happening as expected. It looks like that the “classic” calendar pop over is visible only inside the th filters.

To make sure it wasn’t a single library to act funny I tried to reproduce the same issue with 3 different DatePicker React libraries:

Hacker0x01/react-datepicker gpbl/react-day-picker airbnb/react-dates

I set up a simple sandbox where you can see the issue. code sandbox

The first and the second seems like doing nothing, but in reality the pop over is created, you can see it from the console inspector. (for example div class="react-datepicker-popper is created and has its css)

While the third is created in a modal to showcase that the input is actually working, is just the “inline” version rendering that is acting up.

Thanks for any suggestion or direction you can point me to, and apologise in advance if this is not an issue with the fantastic react-table.

What version of React-Table are you using?

react-table: 6.5.3

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

12reactions
gary-menzelcommented, Sep 21, 2017

UPDATE: the above needs to be getTheadFilterThProps and needs to be at the “table” level and not in the column definition. You should probably also consider checking to make sure the column requires the change and only return the style change if it does.

6reactions
vrmontescommented, Sep 28, 2017

I am using DayPickerInput from react-day-picker and i had to use:

getTheadFilterThProps={() => { return { style: { position: "inherit", overflow: "inherit" } } }}

Without position: “inherit” the date picker closed when clicked outside the width of the input filed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Date picker custom filters - Qlik Community - 1799542
I'm new to click and I just finished my first master calendar, ... More filters / custom ranges and month visualisation of the...
Read more >
How to custom Filter to have DATE FROM and DATE TO?
Use two DatePicker components to filter DataGrid by date range. 1 Like. Mark_Chenpingling April 18, 2021, 3:13pm #3. Almost!
Read more >
Filter button does not search for my custom date picker on click.
I made a custom view where you can filter by department and or theme. Then you can choose start date and end date...
Read more >
Add a Custom ColumnMenu Date Filter to the TreeList - Telerik
In the custom filter we render a DatePicker, whose onChange event calls the onColumnMenuFilterChange event, which sets the state of the filter and...
Read more >
How To Tableau: Simple Custom Date Picker - by Alan Murray
In this how to I show you how to create a simple custom date ... Create a calculated field and call it Date...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found