vue-datepicker icon indicating copy to clipboard operation
vue-datepicker copied to clipboard

feat(datepicker): add preservTime property

Open dam1r89 opened this issue 4 years ago • 4 comments

With this property, component will emit new date object but it will use time component that was set as an input.

dam1r89 avatar Aug 19 '21 10:08 dam1r89

The problem with this is, the timezone. We have two different kinds of times UTC which can be enabled with the use-utc prop and the browser timezone. The reason why the time is normalized too 00:00:00 is because of unexpected behaviours between the different timezones. There are event different timezone based on the time of the year in some countries. This makes this really difficult and need to be tested thoroughly.

MrWook avatar Aug 24 '21 07:08 MrWook

Ok, thank you

dam1r89 avatar Aug 24 '21 07:08 dam1r89

I'm sorry if you misunderstood me. I didn't mean to close this PR. We just need to test it really good in different timezone on different time of the year and check if everythings alright. This will just take a while for me to do

MrWook avatar Aug 24 '21 08:08 MrWook

Sure, I want to help, can you explain your concerns?

Maybe to add method applyTime in the DateUtils class that would use correct methods?


for example:

if (this.useUtc) {
   d1.setUTCHour(...)
} else {
   d1.setHour(...)
}

dam1r89 avatar Aug 24 '21 11:08 dam1r89