Repository navigation
feat: let a date node pick a time - #174
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lero62
requested review from
ChiefCreator,
SearheiParkhamchuk and
dogfrogfog
as code owners
October 7, 2026 17:23
|
🎉 This PR is included in version 1.4.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
This branch was successfully deployed
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.
A date node held a time already — its value is an ISO string — but there was no way to set one.
Payload's
DatePickerdefaults to thedefaultappearance, and that appearance does not merely hidethe clock:
onChangerewrites whatever was picked to noon local time. So the time was not missingfrom the form, it was being thrown away on every pick.
time: trueon a date node switches the picker todayAndTime, which leaves the chosen time alone.It is an ordinary optional parameter, beside
min/maxon a number andminRows/maxRowson alist: registered in
KEYSas a boolean that only a date may carry, so Code cannot put it anywhereelse, and offered in the builder's settings as Pick a time as well. The default value picker in
those same settings follows the switch, so what an admin sets as the default is what an editor sees.
Left opt-in rather than made the default on purpose. Noon is a safe place for a day-only date: it
survives a render in any timezone without sliding to the previous or next day, and every date node
that exists today was written that way. Turning the clock on for all of them would put midnight
within reach of a careless click and move dates across the date line for the sites that format them
locally.
Nothing changes for a node without the key: same appearance, same noon, same stored shape. The site
is untouched either way —
flattenhands a date over as the ISO string it always was.Checked by hand: the parameter passes validation on a date, is refused on a text node ("time is only
for date") and refused when it is not a boolean; a date without it behaves exactly as before.