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

🐛 [Bug]: TimeSelect组件editable的情况下,当用户输入不符合要求的时候,应该自动格式化 #1247

Closed
AcWrong02 opened this issue Jan 4, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@AcWrong02
Copy link
Collaborator

Version

latest

Vue Version

latest

Link to minimal reproduction

see this demo:https://opentiny.design/tiny-vue/zh-CN/os-theme/components/time-select#basic-usage
image

Step to reproduce

输入09后,按下回车,会发现内容仅仅是09,认为可以格式化为初始时间

What is expected

输入09后,按下回车,应该要自动格式化为初始时间比较好一点

What is actually happening

输入09后,按下回车,内容仅仅是09

Any additional comments (optional)

No response

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: When the TimeSelect component is editable, when the user input does not meet the requirements, it should be automatically formatted.

@kagol kagol added the bug Something isn't working label Jan 6, 2024
@AcWrong02
Copy link
Collaborator Author

AcWrong02 commented Jan 7, 2024

同理,当配合picker-options使用的时候,需要进一步对minTime和maxTime进行特殊判断
image
https://opentiny.design/vue-playground?mode=pc&theme=default#3.12|eyJzcmMvQXBwLnZ1ZSI6IjxzY3JpcHQgbGFuZz1cInRzeFwiPlxyXG4vLyDlvJXlhaUgQG9wZW50aW55L3Z1ZSDnu4Tku7ZcclxuaW1wb3J0IHsgQnV0dG9uLCBMaW5rIH0gZnJvbSAnQG9wZW50aW55L3Z1ZSdcclxuXHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICBjb21wb25lbnRzOiB7XHJcbiAgICBUaW55QnV0dG9uOiBCdXR0b24sXHJcbiAgICBUaW55TGluazogTGlua1xyXG4gIH0sXHJcbiAgZGF0YSgpIHtcclxuICAgIHJldHVybiB7XHJcbiAgICAgIG1zZzogJ2hlbGxvIHdvcmxkISdcclxuICAgIH1cclxuICB9X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CJ7XG4gICAgICAgIHN0YXJ0OiAnMDg6MzAnLFxuICAgICAgICBzdGVwOiAnMDA6MTUnLFxuICAgICAgICBlbmQ6ICcxODozMCcsXG4gICAgICAgIG1pblRpbWU6ICcwOTowMCcsXG4gICAgICAgIG1heFRpbWU6ICcxMjozMCdcbiAgICAgIH1cIlxuICAgICAgcGxhY2Vob2xkZXI9XCLpgInmi6nml7bpl7RcIlxuICAgID48L3RpbnktdGltZS1zZWxlY3Q+XG4gIDwvZGl2PlxuPC90ZW1wbGF0ZT5cblxuPHNjcmlwdCBzZXR1cD5cbmltcG9ydCB7IHJlZiB9IGZyb20gJ3Z1ZSdcbmltcG9ydCB7IFRpbWVTZWxlY3QgYXMgVGlueVRpbWVTZWxlY3QgfSBmcm9tICdAb3BlbnRpbnkvdnVlJ1xuXG5jb25zdCB2YWx1ZSA9IHJlZignJylcbjwvc2NyaXB0PlxuXG48c3R5bGUgc2NvcGVkPlxuLnRpbWUtc2VsZWN0LWRlbW8tcGlja2VyIHtcbiAgd2lkdGg6IDI3MHB4O1xufVxuPC9zdHlsZT5cbiIsIl9vIjp7fX0=

@Youyou-smiles
Copy link
Collaborator

@AcWrong02 这个问题已修复,详情可看PR #2735 了解改动情况。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@AcWrong02 This issue has been fixed. For details, please see PR #2735 for the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants