Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datepicker input is always dirty when ngModel is a non-null value #3014

Closed
JimJafar opened this issue Nov 9, 2017 · 14 comments · Fixed by #3115
Closed

datepicker input is always dirty when ngModel is a non-null value #3014

JimJafar opened this issue Nov 9, 2017 · 14 comments · Fixed by #3115

Comments

@JimJafar
Copy link

JimJafar commented Nov 9, 2017

Bug description or feature request:

The datepicker component has the isDirty flag set shortly after being loaded when ngModel is not null.

Plunkr

https://plnkr.co/edit/odlMZcGA7WzuO75TSeCD?p=preview

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 1.9.3

Angular: 4.3.2

Bootstrap: bootstrap-sass 3.3.7

Build system: Angular CLI, System.js, webpack, starter seed:

Webpack
yo angular2-typescript generator version 0.8.1.

@JimJafar JimJafar reopened this Nov 10, 2017
@JimJafar JimJafar changed the title datepicker input is always dirty datepicker input is always dirty when ngModel is a non-null value Nov 10, 2017
@mrajaraman
Copy link

We also have the same issue. May I know when it will get fixed?

@JimJafar
Copy link
Author

This is actually a big problem - it's breaking form validation. Can I help with fixing it if you guys are too busy?

@IlyaSurmay
Copy link
Contributor

Sure, that would be awesome :)

@valorkin
Copy link
Member

ok, seems I have fixed it, testing

@JimJafar
Copy link
Author

Excellent news, thanks @valorkin !
Sorry - we are in crunch time so I didn't get a chance to look at it.

@valorkin
Copy link
Member

Will be published this thusday, but you can check here http://ngx-bootstrap.surge.sh/#/datepicker

@JimJafar
Copy link
Author

JimJafar commented Dec 1, 2017

Hi @valorkin Will you be publishing a new release with this fix? I'm not trying to rush you - just checking so we can set our release timeline :)

@valorkin
Copy link
Member

valorkin commented Dec 1, 2017

I was planning to do release yestarday, but QA took couple of dayoffs,
so she will test it on Monday, and I will be able to release it

@JimJafar
Copy link
Author

JimJafar commented Dec 4, 2017

Fantastic, thank you!

@chanakyanet
Copy link

chanakyanet commented Jan 18, 2018

@valorkin
Error
on edit the form, cancel submission with form reset.
display new form, then it displays calendar input as invalid and dirty, but html text boxes seem to work fine.
except that calendar box

@valorkin
Copy link
Member

@chanakyanet could you provide a sample please?

@chanakyanet
Copy link

@valorkin
could not complete the plunk looks like there is some unknown issue, could you please help me run the below.
https://plnkr.co/edit/E64y9HUKdiAHrp1Q79hm?p=preview so i could work it out.

@mfrieman
Copy link

mfrieman commented Apr 8, 2018

Was this fix ever released because I'm having the same issue.

@kobayakid
Copy link

i came across this issue and a possible workaround may be calling markAsPristine() and markAsUntouched() form methods after setting the null value. it might work on some cases.

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

Successfully merging a pull request may close this issue.

7 participants