question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug (mdDatepicker) Date editing problem

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When editing the date, the selected value is incorrect and this is due to the language of the browser used.

What is the current behavior?

fireshot capture 397 - plunker - https___plnkr co_edit__p preview

navigator.language
"fr"

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.1.3, Material 2.0.0-beta.6

Is there anything else we should know?

The bug is due to the language of the browser for the written in french the month becomes the day and the day becomes the month.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
julianobrasilcommented, Jun 6, 2017

@naoufelus , take a look at this plunker, it’s working: https://plnkr.co/edit/FlgGpjqyDlypas0VZJzo?p=preview

Basically it’s a CustomAdapter class extending the Native one. It’s configured to Brazilian portuguese, but you can change the language to french. I think it will work for you (because the date format is simillar - dd/MM/yyyy).

1reaction
dan-lennoxcommented, Jul 11, 2017

I owe you a beer @julianobrasil

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Issue with date in datepicker - Stack Overflow
When I set the date I see correctly the date selected in the field, but when I save the date, making a Post...
Read more >
Bug: Intermittent datepicker errors when editing entries
When I first publish an entry, leaving the entry date at the default current value and setting an expiration date, the datepicker works...
Read more >
Pickers — KivyMD 0.104.2 documentation
Error text that will be shown on the screen in the form of a toast if the minimum date range exceeds the maximum....
Read more >
angular-formly - JS Bin - Collaborative JavaScript Debugging
Possibly related: "MD Datepicker shows up red underline even though the date is valid". Note the md-is-error attribute on the md-datepicker.
Read more >
Demos > Datepicker - AngularJS Material
Sep 2022 Sep 2022 Sep 2022 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found