Skip to content

chore(DatePicker): Address Left/Right arrows in calendar for RTL#3335

Merged
aresnik11 merged 1 commit intoajr-datepicker-localizationfrom
kl-datepicker-rtl
Apr 30, 2026
Merged

chore(DatePicker): Address Left/Right arrows in calendar for RTL#3335
aresnik11 merged 1 commit intoajr-datepicker-localizationfrom
kl-datepicker-rtl

Conversation

@LinKCoding
Copy link
Copy Markdown
Contributor

Overview

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: [ABC-123]
  • Version plan added/updated (or not needed)
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing Instructions

Don't make me tap the sign.

  1. Go to DatePicker
  2. See that in LTR the buttons in the CalendarHeader are facing their appropriate directions, check over tooltips too
  3. Click and see that navigation works as intended too
  4. Turn on RTL and repeat 2-3
  5. ...
  6. Finish and do a celebratory dance

PR Links and Envs

Repository PR Link
N/A

@LinKCoding LinKCoding changed the base branch from main to ajr-datepicker-localization April 30, 2026 13:37
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 30, 2026

View your CI Pipeline Execution ↗ for commit 344d8d4


☁️ Nx Cloud last updated this comment at 2026-04-30 13:40:00 UTC

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1151 1 1150 0
View the top 1 failed test(s) by shortest run time
DatePicker inside a form in range mode, has two named hidden fields for start and end
Stack Traces | 0.019s run time
Error: expect(received).not.toBe(expected) // Object.is equality

Expected: not "datePickerInput"
    at Object.<anonymous> (.../DatePicker/__tests__/DatePicker.test.tsx:326:28)
    at Promise.then.completed (.../jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../jest-circus/build/utils.js:231:10)
    at _callCircusTest (.../jest-circus/build/run.js:316:40)
    at async _runTest (.../jest-circus/build/run.js:252:3)
    at async _runTestsForDescribeBlock (.../jest-circus/build/run.js:126:9)
    at async _runTestsForDescribeBlock (.../jest-circus/build/run.js:121:9)
    at async run (.../jest-circus/build/run.js:71:3)
    at async runAndTransformResultsToJestFormat (.../build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at async jestAdapter (.../build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at async runTestInternal (.../jest-runner/build/runTest.js:367:16)
    at async runTest (.../jest-runner/build/runTest.js:444:34)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@github-actions
Copy link
Copy Markdown
Contributor

@codecademydev
Copy link
Copy Markdown
Collaborator

📬 Published Alpha Packages:

Package Version npm Diff
@codecademy/gamut 68.3.1-alpha.a2040c.0 npm diff
@codecademy/gamut-icons 9.57.4-alpha.a2040c.0 npm diff
@codecademy/gamut-illustrations 0.58.11-alpha.a2040c.0 npm diff
@codecademy/gamut-kit 0.6.594-alpha.a2040c.0 npm diff
@codecademy/gamut-patterns 0.10.30-alpha.a2040c.0 npm diff
@codecademy/gamut-styles 17.14.1-alpha.a2040c.0 npm diff
@codecademy/gamut-tests 5.3.5-alpha.a2040c.0 npm diff
@codecademy/variance 0.26.2-alpha.a2040c.0 npm diff
eslint-plugin-gamut 2.4.4-alpha.a2040c.0 npm diff

@aresnik11 aresnik11 marked this pull request as ready for review April 30, 2026 14:35
@aresnik11 aresnik11 requested a review from a team as a code owner April 30, 2026 14:35
@aresnik11 aresnik11 merged commit 761cecf into ajr-datepicker-localization Apr 30, 2026
13 of 14 checks passed
@aresnik11 aresnik11 deleted the kl-datepicker-rtl branch April 30, 2026 14:37
aresnik11 added a commit that referenced this pull request May 4, 2026
* calendar phase 1

* add focus management

* add input

* datepicker

* clean up

* refactor datepicker

* clean up hooks

* update exports

* add missing validation file

* clean up inputref

* wip fix for typing date

* cleaning up

* update range logic

* range logic when specific input is focused

* deselect logic

* fix lint

* fix story

* fix lint again

* update snapshot

* fix lint

* show 2 months on larger screens

* style updates

* PR feedback

* fix today in range color

* clean up context

* update placeholder text to be locale based

* update next/last month text to be locale based

* capitalize

* translations

* add formgroup

* fix calendar alignment and add shadow

* clear button logic

* more translations

* fix disabled hover

* make disabledDates optional and add to story

* disabled date in range logic

* fix keyboard nav now that showing 2 months

* PR feedback

* toLocaleUpperCase

* small fixes

* fix range styling

* fix alignments

* rename props

* move around helpers

* fix calendar story

* support small input size

* initial focus a11y updates

* PR feedback

* clean up utils

* add full date aria label to date cells

* move around files and clean up exports

* update locale

* week starts on from locale + polyfill

* remove button from DateCell

* refactor CalendarHeader

* fix errors

* fix ci errors

* input segments

* fix segments typing

* dedupe and format

* version plan

* fix sb import

* tests round 1

* CalendarBody tests

* style updates

* utils tests

* segmentUtils tests

* segment tests

* fix segment refs

* close on date select

* fix focus & active range part

* move DatePicker to organism

* WIP mdx file

* quick actions

* evan pr feedback

* dont render empty border in footer

* first passthrough of PR feedback

* reorg files

* update disabled date logic

* fix icon button tip sticking around

* discriminated union context

* change to object syntax

* PR feedback

* fix date keyboard nav

* more tests & tweaks

* more tests

* sync segment input and calendar month shown

* pr feedback

* fix bugs

* id clean up

* always close calendar on escape

* form tests

* remove robo comments

* prop comments and clean up

* rename to disableDate

* update SB docs

* chore(DatePicker): Address Left/Right arrows in calendar for RTL (#3335)

address left/right buttons in calendar for RTL

* fix failing test

* rtl for arrow icon

* PR feedback

* add placement

* change breakpoint

* add code example to docs

* add height to stories

* more doc clean ups

* change more to floating and use decorator

* Update packages/styleguide/src/lib/Organisms/DatePicker/DatePicker.mdx

Co-authored-by: Kenny Lin <kenny.lin.91@gmail.com>

* Update packages/styleguide/src/lib/Organisms/DatePicker/DatePicker.mdx

Co-authored-by: Kenny Lin <kenny.lin.91@gmail.com>

* PR feedback

---------

Co-authored-by: Kenny Lin <kenny.lin.91@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants