dwqs / v2-datepicker

A simple datepicker component based Vue 2.x: https://dwqs.github.io/v2-datepicker/
MIT License
89 stars 21 forks source link

Bug when manually select data range #3

Closed cosimolemma closed 6 years ago

cosimolemma commented 6 years ago

Hi, when I try to select manually from the calendar a range the dates are subtracted of a day.

Example in DD/MM/YYYY Range: 01/02/2018 - 16/02/2018

I get this values in the v-model variable: Range[0] => 2018-01-31T23:00:00.000Z Range[1] => 2018-02-15T23:00:00.000Z

No problem, instead, when I use picker options.

Bug?

dwqs commented 6 years ago

@cosimolemma Can you show me the code?

cosimolemma commented 6 years ago

@dwqs just solved. Thank you. I didn't notice the "Z" in the timestamp meaning UTC timezone. It was sufficient to perform a conversion to my timezone. Thanks