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

fix: 修复inputDate 配置 valueFormat + 表达式初始值时值不匹配 valueFormat Close: #8652 #8842

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

2betop
Copy link
Collaborator

@2betop 2betop commented Nov 21, 2023

What

🤖[deprecated] Generated by Copilot at ae6e03e

This pull request adds formula support to the input-date renderer and a corresponding test case. It also adds a comment to the input-date-range renderer about a potential enhancement.

🤖[deprecated] Generated by Copilot at ae6e03e

input-date grows
formula expressions now
autumn of testing

Why

Close: #8652

How

🤖[deprecated] Generated by Copilot at ae6e03e

  • Add a new prop changeMotivation to input-date renderer to handle value changes from formula expressions (link)
  • Use normalizeDate function from amis-core to convert value prop to moment object with correct format and timezone in input-date renderer (link, link)
  • Add a test case for input-date renderer to check if defaultValue prop can accept a formula expression that returns a date string (link)
  • Add a comment to input-date-range renderer to suggest a possible future improvement to support value format correction (link)

Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@github-actions github-actions bot added the fix label Nov 21, 2023
@2betop 2betop added this to the 3.6.0 milestone Nov 22, 2023
@lurunze1226
Copy link
Collaborator

有冲突

@hsm-lv hsm-lv merged commit af68cce into baidu:master Nov 23, 2023
3 checks passed
@2betop 2betop deleted the fix-date-defaultValue branch January 17, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InputDate组件和input-time组件在执行默认值公式时未识别valueFormat属性
4 participants