Add datetime component styling#48
Merged
Merged
Conversation
amit-mnnit
approved these changes
Jul 8, 2026
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.
Overview
@aemforms/af-react-vanilla-componentsadded a newDateTimeInputcomponent in v1.0.32, updated the styling for the same. Confirmed by rebuilding the theme from source (both currentmainand the latest published1.0.19tag) and finding zero CSS rules for anycmp-adaptiveform-datetime*class. Without these changes, adatetimefield renders as a bare, unstyled native browser input instead of matching the boxed/bordered look every other field type gets (date, text, number, email, etc.).Changes Made
src/components/datetime/_datetime.scss(new) — adds.cmp-adaptiveform-datetime { @include input; &__widget { width: 100%; } }, following the same one-line pattern used by sibling components (datepicker,emailinput,telephoneinput). The extra&__widget { width: 100%; }compensates forDateTimeInputwrapping its<input>in an extra<div class="cmp-adaptiveform-datetime__input-wrapper">, unlikeDateInputwhich passes the<input>directly — so it doesn't get flexbox's freealign-items: stretchwidth the way other single-input fields do.src/theme.scss— added the import for the new component, placed alphabetically right after thedatepickerimport.src/site/_mixins.scss— addeddiv[data-cmp-is="adaptiveFormDatetime"]to the sharedmargin: 16px 0selector list. This list is the only source of vertical spacing between fields, andDateTimeInput's outer div carries that attribute, which wasn't in the list — so without this, Date/Time fields would render with zero spacing around them.JIRA
https://jira.corp.adobe.com/browse/FORMS-26391
Testing
Rebuilt the theme from source and rendered the actual
DateInput/DateTimeInputcomponent markup with the built CSS in a headless browser. Confirmed Date and Date/Time fields now render identically in box styling, width, and spacing.