Skip to content

feat(datepicker): add preservTime property #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

dam1r89
Copy link

@dam1r89 dam1r89 commented Aug 19, 2021

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

@MrWook
Copy link
Collaborator

MrWook commented Aug 24, 2021

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 MrWook added the enhancement New feature or request label Aug 24, 2021
@dam1r89
Copy link
Author

dam1r89 commented Aug 24, 2021

Ok, thank you

@dam1r89 dam1r89 closed this Aug 24, 2021
@MrWook
Copy link
Collaborator

MrWook commented Aug 24, 2021

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 MrWook reopened this Aug 24, 2021
@dam1r89
Copy link
Author

dam1r89 commented Aug 24, 2021

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(...)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants