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

Enabled custom date masks and support for non-Date models #244

Merged
merged 3 commits into from
Jan 24, 2017

Conversation

pavelpykhtin
Copy link
Contributor

Hi.

I think it could be useful to have a way to customize actual mask format.
Also in our project we have to treat model value as a string. Yo achieve this 'parse' flag was added. Perhaps this functionality will be useful for someone else.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 97.328% when pulling 8de0185 on pavelpykhtin:master into 4b05575 on assisrafael:master.

@assisrafael
Copy link
Owner

Thank you for the pull request.
However I can not accept it until all tests pass.
Can you check the broken tests?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 97.328% when pulling 8d74af5 on pavelpykhtin:master into 4b05575 on assisrafael:master.

@pavelpykhtin
Copy link
Contributor Author

Hi

I checked and fixed broken tests. However I'm not sure that it was related to my changes (maybe I'm missing something).

Problem was related to the default formatting being applied by ngBind to a Date values. Expected date value were converted to string and compared with the value of the span bound to the model. Seems that ngBind uses format different from the format used by Date.toString(). Here is a screenshot of the test form, look at the 'Model value' field.
To fix this I modified check to compare expected value with the actual model value.

@assisrafael
Copy link
Owner

Thank you!

@assisrafael assisrafael merged commit 1996e11 into assisrafael:master Jan 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants