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

How to clear selected date from UI? #344

Open
sakhisoufiane opened this issue Jan 24, 2019 · 1 comment
Open

How to clear selected date from UI? #344

sakhisoufiane opened this issue Jan 24, 2019 · 1 comment

Comments

@sakhisoufiane
Copy link

It's been mentioned that this feature has been added, but we can't figure out how to implement it ?
Anyone knows a way to clear the selected date from the ui ?

@maghidini
Copy link

maghidini commented Oct 23, 2019

I added a template reference on the tag <ng-datepicker> and the use reset() method on my component.

HTML:
<ng-datepicker #date></ng-datepicker>

COMPONENT:

@ViewChild('date') date: ElementRef;

resetDate() {
    this.date.reset();
}

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

No branches or pull requests

2 participants