These are chat archives for indrimuska/angular-moment-picker

19th
Sep 2016
Nate Dudenhoeffer
@AgDude
Sep 19 2016 11:39
@indrimuska First I want to point out that ngModel is in no way restricted to input elements, so it really should impact the use case you describe. I started out my changes with the intent of preserving backward compatibility, but realized that added a lot of complexity, and meant we effectively had to "points of truth" for the value of the model. It is really a design choice on what is the underlying data structure, but one of the things I personally like most about angularjs is the ability to have a model that is programatically useful (like a moment.js object ) and have it bound to a user interface object that shows something pretty (like a date string). In the case of an input element, this is done with the formatters on the ngModelCtrl and the format attribute of moment-picker. In the case of an element that doesn't display the model by default, it would be done with a filter (there is an example in the plunker I linked earlier.).
That being a design choice is why I asked before opening a PR. I intend to use my fork in some changes to production software this week, and have no hard feelings if you don't want it merged into your project.