date picker autocomplete#233
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR extends the document search input to surface a datetime-local picker when the cursor is inside a Date(...) / new Date(...) argument, enabling quick insertion of a quoted ISO timestamp into the filter expression.
Changes:
- Add date-picker state + insertion behavior to the
document-searchcomponent. - Update the document-search dropdown UI to include a datetime-local input above autocomplete suggestions.
- Extend
document-search-autocompletewith helpers to detectDate(...)argument ranges and perform ISO insertion.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| frontend/src/models/document-search/document-search.js | Tracks date-picker context/value during autocomplete updates and inserts ISO strings into Date(...) arguments. |
| frontend/src/models/document-search/document-search.html | Shows a date picker in the autocomplete dropdown and triggers autocomplete updates on more events. |
| frontend/src/_util/document-search-autocomplete.js | Adds parsing + insertion helpers for detecting date argument ranges and converting slices to/from datetime-local. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vkarpov15
left a comment
There was a problem hiding this comment.
Overall this is great! I just had a couple of suggestions:
- Would be great if the autocomplete added the close parenthesis to
new Date()as well so the query could execute immediately after selecting in date picker
- Can there be some sort of shadow or border around the native date picker? Right now it's white on white with no border
-
Clicking outside of the filter input should close the date picker autocomplete
-
Add some tests in document-search-autocomplete.test.js
|
The browser / OS controls that date picker so I can't add anything to make that look better. We'd have to possibly build a custom datepicker or add a backdrop perhaps when they click the date picker button. |
|
The mobile UI is gonna be its own PR |

No description provided.