element-plus icon indicating copy to clipboard operation
element-plus copied to clipboard

[Component] [date-picker] datetimepicker组件时间默认bug

Open wujianxiong1998 opened this issue 1 year ago • 1 comments

Bug Type: Component

Environment

  • Vue Version: 3.4.15
  • Element Plus Version: 2.5.2
  • Browser / OS: Chrome
  • Build Tool: Vite

Reproduction

Related Component

  • el-date-picker

Reproduction Link

Element Plus Playground

Steps to reproduce

时间显示问题,直接看下面的描述即可

What is Expected?

问题一:el-date-picker[type=datetime]日期时间组件选择了年份和月份后,时间会初始化为00:00:00,这个时间和之前选中的时间就无法快速对比了 问题二:在某个场景下,el-date-picker[type=datetime]的时间组件,只希望时间面板选择整五分钟的时间,例如00 05 10 15...

What is actually happening?

el-date-picker[type=datetime]这个组件目前只能选00分钟到59分钟。 每次选年份和月份后时间都会初始化为00:00:00

Additional comments

希望能优化一下

wujianxiong1998 avatar Jan 20 '24 04:01 wujianxiong1998

看起来是有意为之,在设置日期之前,使用startOf('day')将时间设置为今天开始

image

sjx1995 avatar Feb 01 '24 07:02 sjx1995