Skip to content
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

Re-Posting the issue with DatePicker. Issue #35. Date selected is displaying 2(two) days backwards in different time zones. #54

Closed
sai7 opened this issue Dec 21, 2018 · 3 comments

Comments

@sai7
Copy link

sai7 commented Dec 21, 2018

Describe the bug
which template:
[√ ] MaterialDesignFrameworkModule — Material Design
Bootstrap3FrameworkModule — Bootstrap 3
Bootstrap4FrameworkModule — Bootstrap 4
NoFrameworkModule — plain HTML
Other (please specify below)

A clear and concise description of what the bug is.
Previous issue #35
Commit# 5c180bd
Dear @Benjitos, @hamzahamidi. This above commit doesn't resolve the date issue in different time zones. For my local system, it's working fine. After deploying the app in EC2 instance, the date behaves as shown in the following video. Please check it here: https://youtu.be/D0iwFov4t7Q

Scenario:
Let's say if I select a date as 14th, the displayed date will be 12th, but the date in the model(data) will be 13th
Initially, after your last commit, I updated my package to v7.0.1, this issue seems to be solved in my local date settings. But after deploying in the client environment, I still got this issue intact.

To Reproduce
Steps to reproduce the behavior:

  1. Setup the library in an Angular v6 app as specified in the docs.
  2. Used material design framework.
  3. Defined schema and layout for the form.
  4. From my timezone in IST, I changed my system timezone to CST(Chicago)[Indian Standard Time is 11 hours and 30 minutes ahead of Central Time]
  5. The date type form field, which on selecting a date will go 1 day backward. For e.g., if I select 9Nov2018, it will be set in the form as 8Nov2018.

Expected behavior
On selecting a date from the date picker, it should set a correct selected date in the form.

Desktop (please complete the following information):
OS: [MacOS, Windows]
Browser [ chrome, safari]
Version [12, 70.0.3538.77]

Additional context
I think the time is being saved with default timezones and we should consider generalizing the date across all the timezones. Material datepicker has this issue.

Context
This change is really important because we have an application that requires a lot of dates and the dates are being set 1~2 day backward by using this form from different timezones.

@hamzahamidi , I know you are busy, but can you please comment on this.

@sai7 sai7 changed the title Re-Posting the issue with DatePicker. Issue #35. Re-Posting the issue with DatePicker. Issue #35. Date selected is displaying 2(two) days backwards in different time zones. Dec 21, 2018
@sai7
Copy link
Author

sai7 commented Dec 24, 2018

Any updates on this timezone related issue for datepicker, please?

@sai7 sai7 closed this as completed Jan 10, 2019
@sai7 sai7 reopened this Jan 10, 2019
@sai7
Copy link
Author

sai7 commented Jan 10, 2019

No reply for a long time :(

@sai7 sai7 closed this as completed Jan 10, 2019
@hamzahamidi hamzahamidi reopened this Jan 28, 2019
@hamzahamidi
Copy link
Owner

#71

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

No branches or pull requests

2 participants