g1eb / angular-datetime-range

📅 Angular directive for datetime range input
https://rawgit.com/g1eb/angular-datetime-range/master/
MIT License
25 stars 14 forks source link

Fire OnChange() only when something changed #3

Closed IbrahimHd closed 7 years ago

IbrahimHd commented 7 years ago

Hi Gleb,

I have noticed that the OnChange() is being fired in all cases, do you agree that it's more reasonable to close the edit menu but not to call OnChange() if "start or end" does not changed.

Thanks

g1eb commented 7 years ago

Yes, I agree with you that onChange() should be fire only when something is changed.0

I've checked and it seems to work fine, are you seeing onChange() firing when nothing is changed?

IbrahimHd commented 7 years ago

Yes Gleb, onChange() is fired even if nothing has been changed!

g1eb commented 7 years ago

Hmm, very strange! Does this also happen for you on the demo page?

I'd love to look into this but I can't reproduce this issue here. Could you please provide a snippet of the environment where you are using this directive? Maybe a jsbin or something like that?

Thank you in advance!

IbrahimHd commented 7 years ago

the issue has no longer appeared. It seems it was a cashing issue with the old version.

Job done!