a2ui-project / a2ui-project/a2ui

DateTimeInput date parsing is not great.

未关闭
#1,673 3 条评论 0 个 reaction 已指派 1 人 已被 @Varun-S10 认领 在 GitHub 查看
component: angular renderer component: lit renderer component: react renderer P2 type: feature/enhancement
主要语言
TypeScript
星标
16.4k
派生
1.3k
平均合并
2 天 13 小时
30 天内合并 PR
134

描述

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)

贡献指南

打开贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, typescript
领域
frontend, testing
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。