a2ui-project / a2ui-project/a2ui

DateTimeInput date parsing is not great.

Ouverte
#1,673 3 commentaires 0 réactions 1 personne assignée Réclamée par @Varun-S10 Voir sur GitHub
component: angular renderer component: lit renderer component: react renderer P2 type: feature/enhancement
Langage dominant
TypeScript
Étoiles
16.4k
Forks
1.3k
Merge moyen
2 j 13 h
PR mergées (30 j)
134

Description

The Date parsing on the DateTimeInput is not super flexible and because of how browsers work, may "clear" values when rendering them.

Our basic catalog implementation should be a little bit more [robust](https://github.com/a2ui-project/a2ui/blob/main/renderers/angular/src/v0_9/catalog/basic/date-time-input.component.ts#L108-L118) [than](https://github.com/a2ui-project/a2ui/blob/main/renderers/lit/src/v0_9/catalogs/basic/components/DateTimeInput.ts#L31-L52) [this](https://github.com/a2ui-project/a2ui/blob/main/renderers/react/src/v0_9/catalog/basic/components/DateTimeInput.tsx#L22-L40).

There's some cool libraries that we could use (like `any-date-parser` backed by Intl?), but as an MVP, we should guarantee that we can parse exactly what the spec says (and add tests to prove it)

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

The issue points to three component files in different renderers (angular, lit, react) under the v0_9 catalog. Start by examining the linked lines to understand the current date parsing logic. The goal is to make parsing robust per the spec, ensuring it handles browser quirks and doesn't clear values. Write tests to verify the new parsing works exactly as the spec requires.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, typescript
Domaine
frontend, testing
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
55/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.