Skip to content

Repair Datepicker popup and form behavior - #43313

Merged
mdo merged 6 commits into
mainfrom
codex-datepicker-contract
Nov 19, 2026
Merged

mdo merged 6 commits into
mainfrom
codex-datepicker-contract

Conversation

@mdo

@mdo mdo commented Nov 7, 2026 •

Copy link
Copy Markdown
Member
  • Add a separate calendar button for text inputs. Preserve the original input, its listeners, and keyboard focus order.
  • Keep the popup above dialogs and inside the viewport. Update the value immediately on selection and respect reduced motion when opening and closing.
  • Format prefilled dates on page load and submit ISO dates. Block invalid and unavailable typed dates with an error linked to the field.
  • Keep unfinished ranges out of form submissions. Restore the previous range on dismissal and clear invalid entries when a range start is deselected.
  • Add month and year keyboard shortcuts. Name the popup for its field and announce when to choose an end date.
  • Show one month on narrow screens and increase day target height for touch. Keep range buttons stable in width and let date hints wrap.
  • Preserve form resets, disabled fields, and name changes on disposal. Fix focus, selector lookup, and dialog dismissal in Shadow DOM.
  • Inset Form adorn icon buttons by 4px and derive their corner radius from the input. Give the calendar day labels the full configured font size.
  • Lead the docs with button examples. Add an adorned input, range hints, date presets, and an in-calendar Today and Clear row. Update the Alpha 2 migration notes.
  • Add browser regression tests for form values, range cancellation, keyboard focus, Shadow DOM, and popup transitions.

Fixes #43093.
Fixes #43101.
Fixes #43145.
Fixes #43149.
Fixes #43202.

Closes #43097.
Closes #43112.
Closes #43119.
Closes #43150.
Closes #43151.
Closes #43169.
Closes #43232.
Closes #43244.
Closes #43254.

Fixes julien-deramond/bootstrap-test-playground#139.
Fixes julien-deramond/bootstrap-test-playground#155.
Fixes julien-deramond/bootstrap-test-playground#174.
Fixes julien-deramond/bootstrap-test-playground#181.
Fixes julien-deramond/bootstrap-test-playground#185.
Fixes julien-deramond/bootstrap-test-playground#265.
Fixes julien-deramond/bootstrap-test-playground#324.
Fixes julien-deramond/bootstrap-test-playground#356.
Fixes julien-deramond/bootstrap-test-playground#372.

Addresses the Datepicker portion of #43170. Toast and the Anchor Positioning proposal remain open there.

Addresses the Datepicker portions of julien-deramond/bootstrap-test-playground#173, julien-deramond/bootstrap-test-playground#186, and julien-deramond/bootstrap-test-playground#208.

The automatic initialization opt-out proposal in #43372 remains separate.

@netlify

netlify Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for twbs-bootstrap ready!

Name Link
🔨 Latest commit 036e3f9
🔍 Latest deploy log https://app.netlify.com/projects/twbs-bootstrap/deploys/6aff4042d5564ad394ceabee
😎 Deploy Preview https://deploy-preview-43313--twbs-bootstrap.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@julien-deramond julien-deramond added v6 v6, the main branch accessibility Keyboard, screen readers, contrast, ARIA bug Something does not work as documented color-mode Light and dark color modes css Sass sources or compiled CSS docs Documentation site and its content html Component markup: elements, attributes, structure js JavaScript or TypeScript sources and plugins rtl Right-to-left support tests Unit, visual or CSS tests labels Nov 7, 2026
This was referenced Nov 9, 2026
@julien-deramond julien-deramond added has-conflicts Conflicts with its base branch: needs a rebase and removed has-conflicts Conflicts with its base branch: needs a rebase labels Nov 12, 2026
@mdo
mdo force-pushed the codex-datepicker-contract branch from be04470 to 7cd22cd Compare November 14, 2026 20:53
@mdo
mdo marked this pull request as ready for review November 15, 2026 17:24
@mdo
mdo requested a review from a team as a code owner November 15, 2026 17:24
@mdo
mdo requested a review from a team as a code owner November 15, 2026 17:24
Comment thread js/src/datepicker.ts Fixed
Comment thread js/src/datepicker.ts Fixed
mdo added 6 commits November 19, 2026 10:25
Keep keyboard users in the form flow. Preserve the application input
when the calendar closes or is disposed. Submit ISO dates while the
visible field keeps its local format.

Let Bootstrap own popup lifetime, focus, events, and positioning. Give
Vanilla Calendar Pro a separate render node. Keep reset and disabled
form behavior consistent. Repair theme, contrast, RTL, and Sass switch
support. Document the form contract and trusted template boundary.

Refs #43093, #43101, #43145, #43149, #43202
The Datepicker changes increase three JavaScript bundles beyond their
gzip budgets. Raise those limits to the next quarter-kilobyte boundary
above each measured size.
Format prefilled dates before focus and submit their ISO values.
Keep a completed reset when a later reset is canceled. Ignore an
older popup opening after a new opening starts. Respect disabled
fieldsets when opening the calendar.

Keep these fixes from the previous merge commit on the rebased
branch and retain the Datepicker migration notes.
Let people open the calendar without showing the mobile keyboard.
Move focus to the selected date and return focus to the opener.
Keep the popup in view and start its exit as soon as a date is chosen.

Check typed dates against calendar restrictions. Preserve field names
on disposal and handle focus and dialog dismissal inside shadow roots.

Update the examples and migration notes. Cover the new interactions
with browser regression tests and adjust the affected bundle limits.
Show an accessible error for invalid typed dates. Keep incomplete
ranges provisional and restore the last selection on dismissal.
Add keyboard shortcuts and announce the next step in range selection.

Show one month on narrow screens and give date labels room to fit.
Inset the Form adorn button and add a calendar actions example with
Today and Clear. Document the updated behavior and cover regressions.
Each keyboard navigation path sets a direction before it uses it.
Remove the unused initial value flagged by CodeQL.
@mdo
mdo force-pushed the codex-datepicker-contract branch from cf542dd to 036e3f9 Compare November 19, 2026 18:30
@mdo
mdo merged commit fc83812 into main Nov 19, 2026
14 checks passed
@mdo
mdo deleted the codex-datepicker-contract branch November 19, 2026 18:44
@mdo mdo added this to the v6.0.0-alpha.2 milestone Nov 20, 2026
@mdo mdo added this to v6.0.0 Nov 20, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in v6.0.0 Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility Keyboard, screen readers, contrast, ARIA bug Something does not work as documented color-mode Light and dark color modes css Sass sources or compiled CSS docs Documentation site and its content html Component markup: elements, attributes, structure js JavaScript or TypeScript sources and plugins rtl Right-to-left support tests Unit, visual or CSS tests v6 v6, the main branch

3 participants