Try to enter a date by typing (typing a '0' will instantly change to 1/1/2000
What is the use-case or motivation for changing an existing behavior?
The plunker above implements what I understand to be a common pattern with using ngrx/store with reactive forms.
The FormGroup valueChanges emitter is used to keep the store updated with the users changes.
FormGroup setValue is used to keep the form synced with the store (so changes in the store besides those created by valueChanges will be also be reflected in the form).
I think this could be fixed by moving the renderer.setProperty call to inside the sameDate check in the MdDatepickerInput value property setter.
If so, it would probably also make sense to add some code to the blur event to format and set the inputs text so the value displayed in the input after the user leaves the field is the canonical form of the date (zero padding, separators, etc).
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Bug, feature request, or proposal:
What is the expected behavior?
Only update the input text if the value passed to the setter has changed.
What is the current behavior?
The text of the input is always set to the formatted version of the value.
What are the steps to reproduce?
http://plnkr.co/edit/kaS3PvvuSmn0leykKy2D?p=preview
Try to enter a date by typing (typing a '0' will instantly change to 1/1/2000
What is the use-case or motivation for changing an existing behavior?
The plunker above implements what I understand to be a common pattern with using ngrx/store with reactive forms.
The FormGroup valueChanges emitter is used to keep the store updated with the users changes.
FormGroup setValue is used to keep the form synced with the store (so changes in the store besides those created by valueChanges will be also be reflected in the form).
I think this could be fixed by moving the renderer.setProperty call to inside the sameDate check in the MdDatepickerInput value property setter.
If so, it would probably also make sense to add some code to the blur event to format and set the inputs text so the value displayed in the input after the user leaves the field is the canonical form of the date (zero padding, separators, etc).
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
beta-8
Is there anything else we should know?