I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
Plunkr Case (Bug Reports)
http://plnkr.co/edit/sDos4A?p=preview
Current behavior
A date control will remain invalid with errors: {invalidDate: true} when the input value is changed from a value to null.
This may have been introduced with the fix for issue #1676
Expected behavior
By default, a date control should have no validation errors when its value is null.
Minimal reproduction of the problem with instructions
See plunkr above. Steps:
What is the motivation / use case for changing the behavior?
If a null value is always invalid then it seems to be impossible to have a calendar control that is optional on a given FormGroup.
Please tell us about your environment:
MacOS Sierra 10.12.3
Angular version: 2.2.1
PrimeNG version: 2.0.0 to 2.0.5
Browser: Chrome Version 57.0.2987.133 (64-bit)
Language: TypeScript 2.0.6
Node (for AoT issues): n/a
Bug still exists in version >4.
Is there any solutions?
Any solution? I have one case for a non required date field which after writing and deleting the value, the entire form becomes invalid exposing this error object
{ "invalidDate": true }
Will review for 4.1.0 final.
How to allow p-calendar to display only years. I didn't found any property for this. could you please help me in this.
@nagpvn2 p-calendar doesn't have functionality to show only years.
I'd recommend using a dropdown or slider or autocomplete with options defined corresponding to your expected year range.
v7.1.0 p-calendar does not emit change even when using formControlName and leave null value. It does appear to be blank on the input, but never trigger valueChanges in the formControl. Any idea?

It does trigger on valid value though...