vueComponent / ant-design-vue

🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜
https://antdv.com/
Other
20.08k stars 3.78k forks source link

Add format type mask for DatePicker (react v5.14.0) #7705

Open sanyaches opened 2 months ago

sanyaches commented 2 months ago

What problem does this feature solve?

Mask Format Align the date format. Switch the selection by arrow keys. Will try to align the date to the last valid date when blur.

Improves UX significantly by straightforward providing info about date format to users!

What does the proposed API look like?

format={{ format: 'YYYY-MM-DD', type: 'mask', }}

nahzca commented 1 month ago

I strongly support adding this feature to Ant Design Vue. The date format mask functionality is already available in React v5.14.0, but it is not yet implemented in the Vue version. This discrepancy is causing significant difficulties for Vue users.

The absence of a date format mask feature in Ant Design Vue makes it challenging for users to input dates accurately and efficiently. This feature would greatly improve the user experience by providing clear guidance on the expected date format, just as it does in the React version.

We kindly request the development team to prioritize implementing this feature in Ant Design Vue.

We deeply appreciate the development team's hard work and dedication.


我强烈支持将此功能添加到 Ant Design Vue 中。日期格式遮罩功能已在 React v5.14.0 版本中提供,但目前在 Vue 版本中尚未实现。这种差异正在给 Vue 用户带来显著的困难。

Ant Design Vue 中缺少日期格式遮罩功能,使用户难以准确和高效地输入日期。这个功能将通过清晰地指示预期的日期格式来大大改善用户体验,就像在 React 版本中一样。

我们恳请开发团队优先考虑在 Ant Design Vue 中实现此功能。

我们深深感谢开发团队的辛勤工作和奉献。@tangjinzhou

saken14 commented 3 weeks ago

I support this! Or please add event when user inputs symbols from keyboad. Like "input" for component for vue. Now component does not have any keybord input events... There is only 2 events: "change" and "ok" ("change" - a callback function, can be executed when the selected time is changing; "ok" - callback when click ok button).

Or better solution is to add "mask" property for component. It would be good.