fix(template): personal (my) form uses Harmonia date/time pickers, not native inputs#6266
Merged
Merged
Conversation
…t native inputs The my-form-view still rendered native <input type="date"> / type="datetime-local", even though the main form-view (and the Harmonia form-builder) already use the Harmonia components. Mirror them: DATE -> x-h-date-picker, DATETIME-LOCAL -> x-h-datetime-picker, TIME -> x-h-time-picker. The model formats are identical (YYYY-MM-DD / ISO-with-T), so the page's existing toDateInput/toPayload conversions round-trip unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
The generated personal (my) form still rendered native date controls:
even though the main
form-viewand the Harmonia form-builder already use the Harmonia components. Native pickers are not to be used where a Harmonia component exists.Fix
Mirror the canonical
form-viewmarkup inui/my/my-form-view.html.template:DATE→x-h-date-pickerDATETIME-LOCAL→x-h-datetime-pickerTIME→x-h-time-picker(added; previously fell through to a text input)The model formats are identical to the native inputs (
YYYY-MM-DD/ ISO-with-T), so the form page's existingtoDateInput/toPayloadconversions round-trip unchanged — same as the main form-view proves.Audit result (all Harmonia templates)
After this change, the only remaining native date-family inputs across every Harmonia template are
type="month"andtype="week"in the mainform-view— because Harmonia ships no month or week picker (it hasdate-picker,datetime-picker,time-picker,calendar,inline-calendar,slot-picker). See the notify note in the PR discussion.🤖 Generated with Claude Code