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

[Datepicker] dates/formats are constantly changed upon entering calendar #932

Closed
konradkukier2 opened this issue Jun 14, 2019 · 1 comment · Fixed by #936
Closed

[Datepicker] dates/formats are constantly changed upon entering calendar #932

konradkukier2 opened this issue Jun 14, 2019 · 1 comment · Fixed by #936

Comments

@konradkukier2
Copy link
Contributor

Is this a bug, enhancement, or feature request?

bug

Briefly describe your proposal.

Entering calendar (either via calendar icon or input) triggers date/format changes.

Note that theres also validation (red border) triggered for some dates, probably because of wrong format (30.06 is considered as 6th day of 30th month)

Which versions of Angular and Fundamental NGX are affected? (If this is a feature request, use current version.)

fundamental-ngx: "0.5.2"
fiori-fundamentals: "1.5.7"

If this is a bug, please provide steps for reproducing it.

dateformatting

Please provide relevant source code if applicable.

                <fd-date-picker
                    [type]="'single'"
                    formControlName="start">
                </fd-date-picker>
    this.form = this.fb.group({
      start: [],
      end: [],
    });

Is there anything else we should know?

@MattL75
Copy link
Contributor

MattL75 commented Jun 14, 2019

@mikerodonnell89 If you remember this is what I had said @JKMarkowski 's closed PR fixed. This is due to us using toLocaleDate, so this all works fine in the US and Canada, but the format is different for some EU countries. This includes Poland and Austria.

Now it's important to note that the closed PR did not truly fix the issue. It made it so that the calendar worked in the EU but not in North America. The real solution is to eventually get rid of the JS date object, but for now we could also probably stop using toLocaleDate and instead use a more reliable format method.

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

Successfully merging a pull request may close this issue.

3 participants