bug: ion-datetime presentation="date" emits `YYYY-MM-DDTHH:mm:00` (the current wall-clock time) instead of a date-only value
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 74/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
Start in core/src/components/datetime/datetime.tsx and trace how todayParts and defaultParts feed the selected date; then inspect convertDataToISO in utils/manipulation.ts. Check the date-only behavior against the documented presentation="date" format and run the relevant datetime tests. Done means selecting a day emits YYYY-MM-DD without a time.
由索引模型根据 Issue 内容生成。
描述
Ionic Framework Version
v9.x (9.0.7)
Current Behavior
<ion-datetime presentation="date"> with no initial value: clicking a day emits
ionChange detail.value = "2026-09-01T16:19:00"
at 16:19 local time, and datetime.value reads the same string. The time part is whatever the clock showed when the component initialised.
Where it comes from (core/src/components/datetime/datetime.tsx):
- L1529
this.todayParts = parseDate(getToday())—getToday()(utils/data.tsL27–46) returns a full ISO timestamp, so the parts carryhour/minute; - L1534
defaultPartsis derived from them, and selecting a day keeps thosehour/minutefields; convertDataToISO(utils/manipulation.tsL37–40) appendsT${hour}:${minute}:00wheneverhour !== undefined, regardless ofpresentation.
A backend DateOnly / date column rejects the value, and the same picker opened on two days produces two different strings for the same date.
Expected Behavior
presentation="date" emits YYYY-MM-DD (the format the docs describe for a date-only picker and the one min/max accept).
Steps to Reproduce
<ion-datetime presentation="date"></ion-datetime>with novalue.- Click any enabled day.
- Read
event.detail.valueinionChange.
Ionic Info
@ionic/core 9.0.7, Chromium 142 (Playwright headless).
- 主要语言
- TypeScript
- 星标
- 52.7k
- 派生
- 13.3k
- 平均合并
- 3 天 4 小时
- 30 天内合并 PR
- 72
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ionic-team/ionic-framework 的其他 Issue
-
bug: input-otp, backspace in an empty box only moves focus instead of clearing the previous box可能已有人在做 @sarankumar1325 于 8 天前认领。 未关闭package: core type: bug
难度 2/5 1-3 小时 新手友好度 90/100
ionic-team/ionic-framework#31639 · 1 条评论 ·
维护者通常 1 天内回复
-
bug: vue swipe cancellation throws when the previous page is missing可能已有人在做 @dandoingdev 于 31 天前认领。 未关闭package: vue type: bug
难度 2/5 1-3 小时 新手友好度 78/100
ionic-team/ionic-framework#31514 · 1 条评论 ·
维护者通常 1 天内回复
-
bug: ion-searchbar input is always labelled "search text"; aria-label on the host is not forwarded可能已有人在做 @HappyKnuckles 于 26 天前认领。 未关闭a11y package: core type: bug
难度 2/5 1-3 小时 新手友好度 84/100
ionic-team/ionic-framework#31492 · 1 条评论 ·
维护者通常 1 天内回复
-
bug: IonTabs throws when a Fragment contains one IonRouterOutlet可能已有人在做 @Benziza 于 67 天前认领。 未关闭package: react type: bug
难度 2/5 1-3 小时 新手友好度 72/100
ionic-team/ionic-framework#31410 · 2 条评论 ·
维护者通常 1 天内回复
-
package: angular type: bug
难度 2/5 1-3 小时 新手友好度 86/100
ionic-team/ionic-framework#31291 · 1 条评论 ·
维护者通常 1 天内回复
查看 ionic-team/ionic-framework 的全部 Issue
相似的 Issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 61/100
lingdojo/kana-dojo#33465 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
opensheetmusicdisplay/opensheetmusicdisplay#1885 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
Time zone picker still shows America/Winnipeg as -06:00 after Manitoba’s move to permanent UTC-5未关闭
难度 2/5 1-3 小时 新手友好度 66/100
home-assistant/frontend#55537 ·
维护者通常 1 天内回复
-
needs-triage
难度 1/5 1 小时以内 新手友好度 82/100
manaflow-ai/cmux#31347 ·
维护者通常 1 天内回复