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

_min und _max werden beim InputDate nicht korrekt gesetzt #6849

Closed
laske185 opened this issue Sep 19, 2024 · 1 comment · Fixed by #6892
Closed

_min und _max werden beim InputDate nicht korrekt gesetzt #6849

laske185 opened this issue Sep 19, 2024 · 1 comment · Fixed by #6892
Assignees
Labels
bug Something isn't working sample Relates to a sample in the sample-react project. v2

Comments

@laske185
Copy link
Contributor

laske185 commented Sep 19, 2024

Beschreibung:

Wird bei der InputDate-Component ein JavaScript Date-Objekt an die _min und _max Properties übergeben (like _value), werden die Werte nicht korrekt gesetzt – entweder werden sie gar nicht übernommen oder falsch geparst. Dies führt dazu, dass die erwarteten Eingabebeschränkungen (min/max) im UI nicht greifen.

Aufgaben:

  1. Untersuchung des Problems:

    • Überprüfen, warum die _min und _max Properties beim InputDate nicht korrekt geparst oder übernommen werden.
    • Sicherstellen, dass sowohl JS-Date-Objekte als auch Strings in verschiedenen type-Variationen (z.B. date, datetime-local, month, etc.) unterstützt und korrekt behandelt werden.
  2. Beispiel in der Sample-App:

    • Ein Beispiel in der Sample-App integrieren, das die Nutzung von _min und _max mit einem JavaScript-Date-Objekt und Strings demonstriert.
    • Das Beispiel sollte verschiedene type-Varianten (z.B. date, datetime-local) beinhalten, um die Funktionalität vollständig abzudecken.
  3. Tests schreiben:

    • Einen Test implementieren, der das Verhalten der _min und _max Properties mit folgenden Szenarien abtestet:
      • JS-Date-Objekte.
      • String-Repräsentationen von Daten.
    • Die Tests sollten für alle unterstützten _type-Variationen durchgeführt werden (z.B. date, datetime-local, month).

Akzeptanzkriterien:

  • Das InputDate-Component setzt korrekt die min/max Grenzen basierend auf JS-Date-Objekten und Strings.
  • Ein Beispiel in der Sample-App zeigt die Funktionalität von min/max für verschiedene type-Varianten.
  • Unit-Tests decken alle Kombinationen von _min/_max Werten und type-Variationen ab.
@laske185 laske185 converted this from a draft issue Sep 19, 2024
@laske185 laske185 removed the status in KoliBri Board Sep 19, 2024
@laske185 laske185 added bug Something isn't working sample Relates to a sample in the sample-react project. labels Sep 19, 2024
@deleonio deleonio added the v2 label Sep 23, 2024
@laske185 laske185 moved this to Backlog in KoliBri Board Sep 25, 2024
@deleonio deleonio moved this from Backlog to 📄 Ready in KoliBri Board Sep 26, 2024
@AlexanderSchmidtCE AlexanderSchmidtCE self-assigned this Sep 26, 2024
@AlexanderSchmidtCE
Copy link
Contributor

Zu Punkt 1:
Ich habe die Komponente mit jedem Type mit Date und Iso8601 getestet. Das Ergebnis ist folgendes:

time - Wird bei beidem korrekt gemappt

date - Wird bei beidem korrekt gemappt

datetime-local - Min wird bei beidem korrekt gemappt, Max wird nicht korrekt gemappt ( erhällt ein default wert)
week - Iso wird korrekt gemappt. Date wird nicht korrekt gemapt. Es wird ein Error geworfen: Error: Auto convert to week is not supported!

month - Min wird bei beidem korrekt gemappt, Max wird nicht korrekt gemappt ( erhällt ein default wert)

AlexanderSchmidtCE added a commit that referenced this issue Sep 27, 2024
added method to get WeekOfYear for Date

Refs: #6849
AlexanderSchmidtCE added a commit that referenced this issue Sep 27, 2024
AlexanderSchmidtCE added a commit that referenced this issue Sep 27, 2024
AlexanderSchmidtCE added a commit that referenced this issue Sep 27, 2024
@AlexanderSchmidtCE AlexanderSchmidtCE linked a pull request Sep 27, 2024 that will close this issue
AlexanderSchmidtCE added a commit that referenced this issue Sep 27, 2024
AlexanderSchmidtCE added a commit that referenced this issue Sep 27, 2024
AlexanderSchmidtCE added a commit that referenced this issue Oct 8, 2024
AlexanderSchmidtCE added a commit that referenced this issue Oct 8, 2024
AlexanderSchmidtCE added a commit that referenced this issue Oct 8, 2024
@sdvg sdvg moved this from 🔍 Review to 🏗 In progress in KoliBri Board Oct 8, 2024
AlexanderSchmidtCE added a commit that referenced this issue Oct 8, 2024
AlexanderSchmidtCE added a commit that referenced this issue Oct 8, 2024
publicuibot bot pushed a commit that referenced this issue Oct 8, 2024
@sdvg sdvg moved this from 🔍 Review to 🏗 In progress in KoliBri Board Oct 8, 2024
AlexanderSchmidtCE added a commit that referenced this issue Oct 9, 2024
AlexanderSchmidtCE added a commit that referenced this issue Oct 9, 2024
AlexanderSchmidtCE added a commit that referenced this issue Oct 9, 2024
AlexanderSchmidtCE added a commit that referenced this issue Oct 9, 2024
AlexanderSchmidtCE added a commit that referenced this issue Oct 9, 2024
…nicht-korrekt-gesetzt

# Conflicts:
#	packages/test-tag-name-transformer/snapshots/theme-default/snapshot-for-scenarios-disabled-interactive-scenario-firefox-linux.png
#	packages/themes/bmf/snapshots/theme-bmf/snapshot-for-input-date-basic-firefox-linux.png

Refs: #6849
publicuibot bot pushed a commit that referenced this issue Oct 9, 2024
@sdvg sdvg moved this from 🔍 Review to 🏗 In progress in KoliBri Board Oct 11, 2024
AlexanderSchmidtCE added a commit that referenced this issue Oct 11, 2024
AlexanderSchmidtCE added a commit that referenced this issue Oct 11, 2024
@github-project-automation github-project-automation bot moved this from 🔍 Review to ✅ Done in KoliBri Board Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sample Relates to a sample in the sample-react project. v2
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants