-
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
(select) event for NgbInputDatepicker #2181
Comments
Also related to #1984 |
Might not be a good idea to use I suggest we add the following: @Output() dateSelect = new EventEmitter<NgbDateStruct>(); <input ngbDatepicker (dateSelect)="onDateSelect($event)" /> Also deprecate existing |
Is there any workaround for this until the |
@connormlewis |
@frot-io I tried using that but didn't have success in my specific case. My ngb-datepicker is on an input in a reactive form, and when I triggered a function using I eventually got around this by listening to the |
@connormlewis could you give a plunker example? |
@frot-io Yep, here's a link http://plnkr.co/edit/1w2j3iIK1tmbPHxx7Yro?p=preview |
@connormlewis I had almost the same issue, but with template-driven forms. I got it solved by putting My guess is that you shouldn't use |
Hi There is little info for example on using reactive forms with bootstrap directives - it's usually ([ngModel]). I managed to find some interesting validation code elsewhere on here, though it is inadequate as it only tests for a string: it should really validate against the NgbDate object, I'd have thought: this.reportForm.controls['dateFromPicker'].valueChanges.subscribe(data => {
|
I'm not working in this project anymore, so I cannot show you code examples... I think my code was similar to yours (or as described here). |
…to the eventhandler of ngb datepicker directly As stated in ticket: ng-bootstrap#2181
Feature Request
(select)-Output on the -Element on which the NgbInputDatepicker is bound to.
Right now, there is no way to detect if a user has selected a date from the datepicker: https://stackoverflow.com/questions/48903442
Link to minimally-working plunker that reproduces the issue:
http://plnkr.co/edit/DdoP63tqccsItPNZOG4n?p=preview
Version of Angular, ng-bootstrap, and Bootstrap:
Angular: 5.2.0
ng-bootstrap: 1.0.0-beta.9
Bootstrap: 4.0.0
The text was updated successfully, but these errors were encountered: