Context
What's your version of nuqs?
What framework are you using?
- ✅ Other (Tanstack Router)
Which version of your framework are you using?
"@tanstack/react-router": "^1.132.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
Description
BUG: When query states is changed to ?from=1760207400000&to=1760812199999 and I reload the page or open the same URL in different tab, it fails to parse the value and changes the url to ?from="1970-01-01T00%3A00%3A02.025Z"&to="1970-01-01T00%3A00%3A02.025Z"
EXPECTED: URL to be same and parse the timestamps correctly.
However this only happens when I add validateSearch in route definition
export const Route = createFileRoute("/")({
component: App,
// THE BUG ONLY HAPPENS WHEN USING validateSearch IF I REMOVE `validateSearch` IT WORKS AS EXPECTED
validateSearch: createStandardSchemaV1(searchParams, {
partialOutput: true,
}),
});
Reproduction
Deployed Version: https://nuqs-repro.pages.dev/
GitHub Repo: https://github.com/mdhruvil/nuqs-repro
- Visit "/"
- Current Week is selected by default, see URL and values displayed on page
- Click on "Set to Previous Week"
- It changes url to select previous week (works as expected)
- Refresh the page or copy url and open in new tab
- It changes url to
?from="1970-01-01T00%3A00%3A02.025Z"&to="1970-01-01T00%3A00%3A02.025Z" instead of parsing the actual timestamp values
Context
What's your version of
nuqs?What framework are you using?
Which version of your framework are you using?
Description
BUG: When query states is changed to
?from=1760207400000&to=1760812199999and I reload the page or open the same URL in different tab, it fails to parse the value and changes the url to?from="1970-01-01T00%3A00%3A02.025Z"&to="1970-01-01T00%3A00%3A02.025Z"EXPECTED: URL to be same and parse the timestamps correctly.
However this only happens when I add
validateSearchin route definitionReproduction
Deployed Version: https://nuqs-repro.pages.dev/
GitHub Repo: https://github.com/mdhruvil/nuqs-repro
?from="1970-01-01T00%3A00%3A02.025Z"&to="1970-01-01T00%3A00%3A02.025Z"instead of parsing the actual timestamp values