baidu / baidu/amis

日期范围控件解析默认值错误

Open
#3,733 0 comments 0 reactions 0 assignees View on GitHub
need confirm
Dominant language
TypeScript
Stars
18.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

#### 描述问题:

请用一段清晰简洁的文字描述问题是什么...

#### 截图或视频:

可以的话,尽可能提供截图或视频来补充描述你的问题...

#### 如何复现(请务必完整填写下面内容):

1. 你是如何使用 amis 的?
`sdk`、`npm` 或`其他`...

2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在

3. 粘贴有问题的完整 `amis schema` 代码:
```
{
"type": "page",
"data": {
"v": "${now|dateModify:subtract:6:day|date:YYYY-MM-DD},${now|date:YYYY-MM-DD}"
},
"body": {
"type": "form",
"api": "/amis/api/mock2/form/saveForm",
"body": [
{
"type": "input-date-range",
"name": "select",
"label": "日期范围",
"format": "YYYY-MM-DD",
"value": "${v}"
}
]
}
}
```

4. 操作步骤
请简单描述一下复现的操作步骤...

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the input-date-range schema and its value expression, then reproduce how the default date range is parsed from the supplied six-day-to-current-date string. Compare the control's displayed range with the expected dates and document the result. Done means the provided schema initializes the date range correctly and the regression is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.