element icon indicating copy to clipboard operation
element copied to clipboard

[Bug Report] DateTimePicker 组件当指定格式为“yyyy年MM月dd日 HH:mm:ss”,组件上部time选择器格式解析出错

Open Tylermeek opened this issue 1 year ago • 7 comments

Element UI version

2.7.2

OS/Browsers version

mac 12.4

Vue version

2.6.11

Reproduction Link

https://codepen.io/Tylermeek/pen/gOBjKwL

Steps to reproduce

当使用DateTimePicker 组件,指定format为“yyyy年MM月dd日 HH:mm:ss”,value-format为"yyyy-MM-dd HH:mm:ss"的时候,组件输入框解析正常,数据格式正常,但是组件选择框的上部的time选择器格式解析出错,应该是此处的内部解析代码有问题

What is Expected?

正确解析time

What is actually happening?

将date的格式解析到了time格式,实测即使是最新的版本仍然会出现问题,在最新版本内工具函数utils有date相关函数进行正则表达式解析time format了(应该是此处),希望可以提供在不更改element版本的情况下提供解决方式

Tylermeek avatar May 15 '23 09:05 Tylermeek

Snipaste_2023-06-12_11-22-50 I also have the same problem, the time selector display error, why is it not resolved?

By-Jun avatar Jun 12 '23 03:06 By-Jun

so am I

image

ViLi230 avatar Jul 07 '23 01:07 ViLi230

这是来自 zhao 的自动回复邮件。

您好!您的邮件已收到!

By-Jun avatar Jul 07 '23 01:07 By-Jun

https://codesandbox.io/s/elementui-playground-forked-chggr4?file=/src/App.vue

ViLi230 avatar Aug 22 '23 01:08 ViLi230

这是来自 zhao 的自动回复邮件。

您好!您的邮件已收到!

By-Jun avatar Aug 22 '23 01:08 By-Jun

image

bird0113 avatar Mar 28 '24 07:03 bird0113

这是来自 zhao 的自动回复邮件。

您好!您的邮件已收到!

By-Jun avatar Mar 28 '24 07:03 By-Jun