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

feat(date-picker): adds closePanelOnSelectYearclosePanelOnSelectMonth prop #5564

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

pengzhen-developer
Copy link

@pengzhen-developer pengzhen-developer commented Jan 9, 2024

变更说明:

date-picker 添加 closePanelOnSelectDate 属性,该属性控制,当选择了年/月后,自动关闭年月面板,方便选择日。

相关问题:

#4462
#5541
#3615

Copy link

vercel bot commented Jan 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
naive-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 29, 2024 9:06am

@pengzhen-developer
Copy link
Author

效果预览:

2024-01-09.15.54.42.mov

src/date-picker/src/panel/panelHeader.tsx Outdated Show resolved Hide resolved
src/date-picker/src/panel/use-panel-common.ts Outdated Show resolved Hide resolved
src/date-picker/src/panel/use-panel-common.ts Outdated Show resolved Hide resolved
fix(date-picker): change required

Co-authored-by: OrbisK <[email protected]>
@07akioni
Copy link
Collaborator

Wouldn't it be wired if year click triggers panel close? Month click is somehow reasonable in specific cases.

@pengzhen-developer
Copy link
Author

Wouldn't it be wired if year click triggers panel close? Month click is somehow reasonable in specific cases.

我尝试做这个。

@07akioni
Copy link
Collaborator

Wouldn't it be wired if year click triggers panel close? Month click is somehow reasonable in specific cases.

我尝试做这个。

Actually I think double click to trigger close is somehow reasonable? One click would always confuse somebody.

@pengzhen-developer
Copy link
Author

Wouldn't it be wired if year click triggers panel close? Month click is somehow reasonable in specific cases.

我尝试做这个。

Actually I think double click to trigger close is somehow reasonable? One click would always confuse somebody.

Double-click to hide, is it a hard-to-discover feature for normal users?

@pengzhen-developer
Copy link
Author

adds closePanelOnSelectYear, closePanelOnSelectMonth prop

2024-01-24.09.42.56.mov

@pengzhen-developer pengzhen-developer changed the title feat(date-picker): adds closePanelOnSelectDate prop feat(date-picker): adds closePanelOnSelectYearclosePanelOnSelectMonth prop Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants