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 input cannot change day with #6418

Closed
davidrensh opened this issue Aug 11, 2017 · 3 comments
Closed

datepicker input cannot change day with #6418

davidrensh opened this issue Aug 11, 2017 · 3 comments
Assignees

Comments

@davidrensh
Copy link

Bug, feature request, or proposal:

datepicker input cannot change day.

What is the expected behavior?

It should allow the end user change date in input box. Not calendar only

What is the current behavior?

datepicker input cannot change day. It happens when you work with [(ngModel)]="startDate" (ngModelChange)="startDateChange($event)". it will show null on console with plunker

What are the steps to reproduce?

Plunker: https://plnkr.co/edit/XJkfze8c0V7MtigKRLV6?p=preview
step 1. select any date in calendar
step 2. change day to value higher than 12 (13,14..)
step 3. console will show startdatechange e null null

@julianobrasil
Copy link
Contributor

julianobrasil commented Aug 12, 2017

It happens because you probably is in a region that work with dates in dd/mm/yyyy fomat. Without any custom DateAdapter implementation, the datepicker expects a date formated like mm/dd/yyyy (and, of course, there's no month above 12 as I imagine you're trying to set).

See this plunker with a custom DateAdapter configured to a language (Portuguese) that works with dd/mm/yyyy: https://plnkr.co/edit/FlgGpjqyDlypas0VZJzo?p=preview

@mmalerba
Copy link
Contributor

Yep, as @julianobrasil stated you will need a custom DateAdapter for now. We have some issues filed to improve the situation: #6030, #5972

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants