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

Date selected using a Datepicker causes selected date to 1 day backward. #35

Closed
4 tasks
sai7 opened this issue Nov 9, 2018 · 5 comments
Closed
4 tasks

Comments

@sai7
Copy link

sai7 commented Nov 9, 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.

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. 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
Please let me know how to handle this scenario. We are planning to deploy this app in the production where clients will be using this forms.

Context

This change is really important because we have an application that requires a lot of date fields and the dates are being set 1 day backward by using this form.

I am not sure why others are not getting this behavior or have they handled this by themselves?

@sai7
Copy link
Author

sai7 commented Nov 9, 2018

@hamzahamidi can you please help me pass from this issue?

@Benjitos
Copy link

5c180bd

@hamzahamidi
Copy link
Owner

I will check this out. I'm truely very busy these days, so I dont have much time to work on the library.

@sai7
Copy link
Author

sai7 commented Dec 12, 2018

5c180bd

Thanks, @Benjitos, @hamzahamidi. This 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 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.

@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

3 participants