Repository navigation
feat(DateTimeInput): add native picker option - #5620
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsDateTimeInput (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression14 added · 0 removed. View the report To accept these exact frames: Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
23d01ac to
a1f31c6
Compare
a1f31c6 to
6f95a80
Compare
rubyycheung
left a comment
There was a problem hiding this comment.
Looks good from design. The nativePicker modes provide a clear choice between OS-native and Astryx-owned date/time surfaces, while preserving the established two-segment field presentation and explicit fallbacks for unsupported time features.
xinzi-bot
left a comment
There was a problem hiding this comment.
Thanks — the native picker implementation lines up with DateInput, but the Storybook docs still teach the old touch default. The component description says coarse-pointer DateTimeInput opens the Astryx bottom sheet, while this PR makes nativePicker="touch" use OS date/time controls by default. Could you update that overview so the default and nativePicker="never" paths are separated?
[Automated review]
6f95a80 to
78f7f23
Compare
78f7f23 to
ff3477a
Compare
xinzi-bot
left a comment
There was a problem hiding this comment.
Thanks — the implementation and core docs now line up with DateInput's native-picker model, but the public Storybook docs still teach the old touch surface. The component overview says coarse-pointer DateTimeInput opens the Astryx bottom sheet by default, and the timeIncrement argType still says mobile touch uses wheels. Could you update those Storybook descriptions so the default native path and nativePicker="never" path are separated?
[Automated review]



What
Add
nativePickertoDateTimeInput, matchingDateInput's surface-selection API for both date and time:'touch'(default)<input type="date">and<input type="time">on a coarse primary pointer; Astryx surfaces otherwise'always''never'The native controls keep DateTimeInput's two-segment field, distinct labels, controlled ISO datetime value, constraints, theming targets, and public date-input ref.
Both native segments use the iOS-safe shape established by
DateInput: uncontrolled DOM values, nativeinput/changelisteners with deduplication, no programmatic writes while focused, and stale-blur protection. A time chosen before the date is retained and combined when the date commits. PendingchangeActionwork no longer disables or detaches an open native wheel.Compatibility fallbacks
The OS time picker cannot faithfully provide every Astryx time feature.
hasSeconds, a non-defaulttimeIncrement, ortimeOptionIntervalretain Astryx's time field while the date remains native. Date constraints and datetime min/max are always enforced in JavaScript; native min/max attributes are hints because iOS may not visually disable invalid wheel values.iOS verification
Verified against the built component in iOS 26.5 Safari on an iPhone 17 Pro simulator:
2026-03-15T14:30to2026-03-15T14:32;Test plan
pnpm lint:strictpnpm build