iview [Bug Report]DatePicker parsing date ISOString format gets wrong date

eyh26e7m  于 2022-11-19  发布在  其他
关注(0)|答案(1)|浏览(206)

Environment

v3.4.1

https://run.iviewui.com/zglVaSWB

Steps to reproduce

<DatePicker v-model="dateValue" />

dateValue = 2019-05-16T16:00:00.000Z

What is expected?

2019-05-17

What is actually happening?

2019-05-16

Its seems that the component gets the date part without refering to the timezone indicated.

kognpnkq

kognpnkq1#

try this
dateValue=new Date('2019-05-16T16:00:00.000Z');

相关问题