Fix for undefined values#25
Conversation
…der and do not show error message
|
Thank you for contributing to our project! Can you explain why you would want different behaviour for |
|
For now the input have to have initial value. I would like to have such functionality: If there is no value of datepicker selected by user, the value of the model is undefined and input placeholder is shown. |
|
But we should check for null of course. |
|
Yeah, I think there is no reason to have different behaviour for null and undefined in the timepicker. Could you maybe show an example where you would need your modifications? If we would want to merge your pull request, we also need some tests. |
|
My case is very simple: until a user himself selects the value of timepicker no value should be selected and placeholder should be displayed. In this case the value of model is undefined. It works as it should now, but there is an annoying error in console without reason. Or I don't see one. My fix just cleans this console error. In the jquery lib you can have a timepicker without initial value as you can see in the demo http://jonthornton.github.io/jquery-timepicker/. |
|
That makes sense. Currently we use |
|
Hey @timmipetit, the tests for undefined ngModel is ready. I'm sorry it took so long for me to do. I've had tons of other urgent work to complete. If anything wrong with the tests, just tell me - I'll do my best to do it the right way. Thanks! |
|
Hey @1itvinka, awesome work, thanks for contributing to this project! |
If the value is undefined show the input placeholder and do not show error message.