-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix(datepicker): support NgbDateAdapter
in NgbInputDatepicker
#2003
Conversation
LGTM, this is what I had but there seems to be an issue with the current I added |
@msosa I think it's the adapter implementation issue. I think your example crashes when you set something like a string to the Actually the |
Ah yes I am using both Awesome, thanks! |
I found a problem with validation, the input field is always invalid using a custom
I'm quite busy at the moment, I'll do more tests next week. |
@battistaar yes, you're right, thanks. Forgot to add conversion here. It's obviously working without it for the default adapter... Will push and update the demo to add datepicker with input |
013f232
to
4383b28
Compare
|
4383b28
to
50500bf
Compare
I'm trying to make the model as native Date, but the input format to be "dd-mm-yyyy" and not the standard iso. when I pick a date from datepicker, the model changes back to ngbDateStruct... instead of Date. |
Yeah you're not actually using the adapter, look at how the demo does it
|
oh crap. I got the syntax wrong :) thx for the comment. |
NgbDateAdapter
in the datepicker with inputNgbDateStructAdapter
is more forgiving now ('2017-11'
transformed into{year: 2017, month: 11, day: 1}
)so I changed one test case for this as well.@msosa, could you take a look?
Fixes #2002