Exploring the concept of the patchValue method, I discovered that when using this method to update form values, the form is marked as dirty.
// Implementing it like this
setTimeout(() => {
this.skillForm.patchValue({
date: [new Date()],
});
}, 1000);
Check out a live demo here: click here
However, by approaching it differently, the form remains clean:
setTimeout(() => {
// workaround for this scenario
this.skillForm.controls['date'].patchValue(new Date());
}, 1000);
See the modified example here: click here