DateTimePicker.prototype.setPristine = function () { if (this.form) { this.form.$setPristine(); if (this.form.$$parentForm.$dirty) { this.form.$$parentForm.$setPristine(); } if (this.form.$$parentForm.$$parentForm && this.form.$$parentForm.$$parentForm.$dirty) { this.form.$$parentForm.$$parentForm.$setPristine(); } } };I don't really like it. Is there a cleaner way to set everything to pristine from the bottom up?