Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

datetime is dirty from the start #88

Open
2J opened this issue Nov 18, 2016 · 10 comments
Open

datetime is dirty from the start #88

2J opened this issue Nov 18, 2016 · 10 comments

Comments

@2J
Copy link
Contributor

2J commented Nov 18, 2016

<datetime ngModel #example="ngModel" name="example"></datetime>
{{example.dirty}}
@2J
Copy link
Contributor Author

2J commented Jan 2, 2017

Model is being set dirty in function clearModels, which is being called from function writeValue as soon as component is initialized.

@rgiosa
Copy link

rgiosa commented Feb 21, 2017

I think this is a problem if we use validations.

@mattmcardle
Copy link

Anyone know of a fix for this issue?

@lonesha
Copy link

lonesha commented Jun 27, 2017

@mattmcardle It looks like this is an issue because of the call in clearModels(). The first line of that method is this.dateChange.emit(null); which triggers onChange (and consequently makes the control dirty). At first glance, it seems that line should be removed.

@gottsohn
Copy link

Is there a PR for this?

1 similar comment
@rgiosa
Copy link

rgiosa commented Oct 16, 2017

Is there a PR for this?

@gottsohn
Copy link

yes #176 @rgiosa

@rgiosa
Copy link

rgiosa commented Oct 16, 2017

@nkalinov can you merge? =) this is a huge problem for me.

@gottsohn
Copy link

@rgiosa @nkalinov HUUUGGGGEE!!!! for me too.
I literally had to edit the node_modules and add some comments in the component to hint this.

@rgiosa
Copy link

rgiosa commented Dec 5, 2017

1 year...

=(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants