Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing several issues with the new Datepicker and making behavior closer to the old one #2625

Merged
merged 5 commits into from
Oct 28, 2024

Conversation

bjosttveit
Copy link
Member

@bjosttveit bjosttveit commented Oct 23, 2024

Description

Fixes:

  • DateInput is able to parse any ISO string, not just the particular format we save
  • DateInput automatically fills inn separator characters
  • DayPicker: changing month using arrows or dropdowns now works
  • DayPicker: clicking the small arrows (chevron) in dropdown now works as expected
  • DayPicker: Dropdowns now scroll to the selected value, instead of showing the year 2124
    • This required a workaround because the Combobox component does not have any support for this.

Other changes

I refactored a few things, for example moving the calendar button outside of the input component and structuring the dialog a bit differently.

Related Issue(s)

Verification/QA

  • Manual functionality testing
    • I have tested these changes manually
    • Creator of the original issue (or service owner) has been contacted for manual testing (or will be contacted when released in alpha)
    • No testing done/necessary
  • Automated tests
    • Unit test(s) have been added/updated
    • Cypress E2E test(s) have been added/updated
    • No automatic tests are needed here (no functional changes/additions)
    • I want someone to help me make some tests
  • UU/WCAG (follow these guidelines until we have our own)
    • I have tested with a screen reader/keyboard navigation/automated wcag validator
    • No testing done/necessary (no DOM/visual changes)
    • I want someone to help me perform accessibility testing
  • User documentation @ altinn-studio-docs
    • Has been added/updated
    • No functionality has been changed/added, so no documentation is needed
    • I will do that later/have created an issue
  • Support in Altinn Studio
    • Issue(s) created for support in Studio
    • This change/feature does not require any changes to Altinn Studio
  • Sprint board
    • The original issue (or this PR itself) has been added to the Team Apps project and to the current sprint board
    • I don't have permissions to do that, please help me out
  • Labels
    • I have added a kind/* label to this PR for proper release notes grouping
    • I don't have permissions to add labels, please help me out

@bjosttveit bjosttveit added the kind/bug Something isn't working label Oct 23, 2024
Copy link

sonarcloud bot commented Oct 25, 2024

@bjosttveit bjosttveit changed the title different approach to parsing and saving from dateinput Fixing several issues with the new Datepicker and making behavior closer to the old one Oct 25, 2024
@bjosttveit bjosttveit marked this pull request as ready for review October 25, 2024 15:32
Copy link
Contributor

@paal2707 paal2707 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Veldig bra!

src/layout/Datepicker/DatePickerInput.tsx Show resolved Hide resolved
@bjosttveit bjosttveit merged commit f49a523 into main Oct 28, 2024
21 checks passed
@bjosttveit bjosttveit deleted the fix/new-datepicker-behavior branch October 28, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DatePicker v4.9: Flere problemer ved valg fra nedtrekksmenyer Datepicker only works with manual input
2 participants