Primeng: Clear button for Calendar

Created on 22 Jun 2016  路  10Comments  路  Source: primefaces/primeng

Hi @cagataycivici

Is there any option to validate the date format when date is entered manually. Also, is it possible to have a clear button inside the control to clear the input field or any similar behavior.

Thanks in advance.
Aniket

new feature

Most helpful comment

Set to 4.1.4.

All 10 comments

Hi,
I support the idea to have clear button, because i didn't find how i can clear value from calendar.

Thank you.

not the best solution, but if you get a reference to the element via ViewChild

you can set the value and use updateInputField() to get the behavior you want...

eg;

@ViewChild('p-calendar') calendar: Calendar;
this.calendar.value = null;
this.calendar.updateInputField();

Please try with the latest PrimeNG version and comment if the issue still persists.

Why was this closed, a clear button was not added to the calendar?

Sorry for the misunderstanding. I will discuss it with my colleagues and will get back to you from here about the decision.

Scheduled for 4.1.1

This new feature does not appear on the 4.1.1 milestone list. Nor is it on 4.1.2. Can we get an update on when this feature? Thanks!

@cagataycivici any updates on this?

Set to 4.1.4.

There is a way to call this clear function by an external button using ViewChild... There is any other form?

Was this page helpful?
0 / 5 - 0 ratings