Draft
Conversation
add input boxes for from and to search date move the chronology filter update logic into a helper function add a method for date input to trigger chronology filter logic connect slider and input boxes to display the same dates prettify the slider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should hopefully fit the needs described in issue #36.
before:


after:
The new input boxes are synchronized with the range slider and both update each other in real time. The filtering can be triggered both by changing the dates in the input field and by sliding the slider.
I went with receiving the input as plain text and testing for correct date formats in the JS portion. There are also some basic tests to make sure the input dates are within the allowed min and max range, and that the from date is actually lower than the to date. Although there is no feedback if the input is faulty and nothing happens – but also nothing crashes.
The allowed input date formats are bound to the language and are "DD.MM.YYYY" for german and "MM.DD.YYYY" for english respectively.
I adjusted the looks aswell. I removed the grid (since it was just showing random and confusing dates below the slider) and added some horizontal bars to make the grouping of different filter options more intuitive.
Please feel free to openly comment on the whole approach. I think it works rather nicely and apart from some error feedback I can't think of any major adjustments I would aim for.
I was thinking about implementing a switch that let's you decide between searching for a range / a specific date, but that felt overkill to implement for the time being. Same goes for having a pop-up calendar to input the dates and I'm not even sure if that is any user friendly if not done right.