[Fix]: Update timetable date picker to support selecting the current date - #3368
Open
lvachon1 wants to merge 2 commits into
Open
[Fix]: Update timetable date picker to support selecting the current date#3368lvachon1 wants to merge 2 commits into
lvachon1 wants to merge 2 commits into
Conversation
…e're on, and so the browser treats it as an anchor link (which it is) and scrolls to that anchor (which it's already on). I added a random parameter to the URL to disable this behavior. It works, and is not the first time I've used this trick, but I'm not sure it is the cleanest solution.
…om character from a to z. This gives a 1:17576 chance of the bug occuring
thecristen
reviewed
Jul 31, 2026
thecristen
left a comment
Collaborator
There was a problem hiding this comment.
😵💫 Creative and makes me uncomfortable.
I noticed in BuildCalendar.Day.td/1 that it renders the link with the #date-filter anchor, and that removing this seems to make the link behave the way we want (at least when I tried it in Vivaldi just now). I wonder if there's something we could do with that, like removing that anchor if we happen to be looking at the current date, or something like that.
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.
Scope
Asana Ticket: Update timetable date picker to support selecting the current date
Implementation
It appears that our problem is that the URL is identical to the one w…e're on, and so the browser treats it as an anchor link (which it is) and scrolls to that anchor (which it's already on). I added a random parameter to the URL to disable this behavior. It works, and is not the first time I've used this trick, but I'm not sure it is the cleanest solution.
Screenshots
Screen.Recording.2026-07-29.at.11.50.12.AM.mov
How to test
http://localhost:4001/schedules/CR-NewBedford/timetable
Confirm that re-selecting the currently selected date closes the calendar and refreshes the page.