Skip to content
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

Fixes to Date Range selection #33

Open
techrah opened this issue Dec 4, 2019 · 3 comments
Open

Fixes to Date Range selection #33

techrah opened this issue Dec 4, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@techrah
Copy link
Collaborator

techrah commented Dec 4, 2019

Based on peer feedback:

  • Investigate date range validation (from less than to). It doesn't seem to be possible in Dash to have a callback update the same control that triggered the callback. Further investigation required.

  • Alternate solution: move logic into data wrangling for chart. If from-date is less than to-date, swap in wrangling code

@sreejithmunthikodu sreejithmunthikodu added the bug Something isn't working label Dec 6, 2019
@sreejithmunthikodu sreejithmunthikodu self-assigned this Dec 6, 2019
@techrah
Copy link
Collaborator Author

techrah commented Dec 7, 2019

UPDATE: More details on the issue.

The reason that validation in the dropdown control was not implemented in the first place was because Dash callbacks cannot handle inputs and outputs being the same control.

https://community.plot.ly/t/same-input-and-output-in-a-callback/20002

This means that if I change the start year which calls some callback function... and it happens that the year is larger than the end year, that function cannot update the control that called it and reset the year back to a sane value.

@sreejithmunthikodu
Copy link
Collaborator

Thanks Ryan for the info.
I implemented the alternate solution in #36

@techrah
Copy link
Collaborator Author

techrah commented Dec 7, 2019

Reopening this issue. This does not seem to be working on the deployed app.

@techrah techrah reopened this Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants