Selecting a new Calendar value does not update the value in the formControlName
I tried setting the model property to a string, I also tried setting the dataType on the calendar to a string. To set the default value on the calendar from the model, I have to convert the value to a new date. Listening to onBlur also shows the old value, not the new value.
I am using Angular 7, Ionic 4 and PrimeNg 7.1
ngOnInit() {
this.form = new FormGroup({
dfrDate: new FormControl(null, {
updateOn: 'blur',
validators: [Validators.required]
}),
<p-calendar #dfrDateRef dataType="string" showButtonBar="true" formControlName='dfrDate' [showIcon]="true" ></p-calendar>
I expect the form control value to update automatically, like all other form fields. I can get around this by using viewChild on form submission, but that would a pain to do for every date field in this app