fix(query): use native date inputs in query options - #953
Conversation
Git-Session-Id: 7ccb
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #953 +/- ##
=======================================
Coverage 49.55% 49.55%
=======================================
Files 45 45
Lines 2779 2779
Branches 596 629 +33
=======================================
Hits 1377 1377
Misses 1381 1381
Partials 21 21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Greptile SummaryThe PR replaces the shared BootstrapVue date pickers with native date controls while preserving string-compatible query behavior.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "fix(query): preserve native date value f..." | Re-trigger Greptile |
| input.form-control(type="date" v-model="queryOptionsData.start") | ||
| b-form-group(label="Stop" label-cols=2) | ||
| b-form-datepicker(v-model="queryOptionsData.stop") | ||
| input.form-control(type="date" v-model="queryOptionsData.stop") |
There was a problem hiding this comment.
Moment values blank date inputs
When Search or Category Builder opens, their Moment-valued defaults are copied directly into these native date inputs instead of being normalized to YYYY-MM-DD, causing the Start and Stop controls to render blank rather than showing the active query range.
Knowledge Base Used:
There was a problem hiding this comment.
Fixed in b31bca3. mounted() now formats start/stop to YYYY-MM-DD before the native date inputs bind, so Moment-valued defaults from Search and Category Builder show the active range instead of blank controls.
Git-Session-Id: 7ccb
|
@greptileai review |
| start: moment(this.queryOptions?.start || this.queryOptionsData.start).format('YYYY-MM-DD'), | ||
| stop: moment(this.queryOptions?.stop || this.queryOptionsData.stop).format('YYYY-MM-DD'), |
There was a problem hiding this comment.
Range extension blanks start date
When a user extends the Search, Report, or Graph range by one week, extendByWeek assigns a Moment to queryOptions.start after the mount-only normalization has run. That Moment reaches the native date input without being converted to YYYY-MM-DD, causing the Start control to render blank even though the query uses the extended range.
Knowledge Base Used: Queries and reporting
Git-Session-Id: 7ccb
|
@greptileai review |
|
CI-green and mergeable (Greptile 5/5) — waiting only on a maintainer click. This PR is ready to merge, but the bot has pull-only access to this repo and can't self-merge — surfacing it here so it isn't lost. The monitoring loop will stop re-flagging it now that this note is posted. |
What changed
Replace the Start and Stop BootstrapVue date pickers in
QueryOptions.vuewith nativeinput type="date"controls. Search, Report, Graph, and Category Builder share this component, so they now support keyboard date entry and platform-native date selection consistently with Query Explorer.The affected callers now keep date values in
YYYY-MM-DDform both initially and when extending a range, preserving query semantics while satisfying native input requirements.Fixes #944
Verification
vue-cli-service linton all changed Vue/test filestsc --noEmit --pretty falsejest --selectProjects jsdom --runInBand test/unit/QueryOptions.test.js(3 tests)2026-08-15/2026-08-16values persisted