I really don't fully understand how these things work. The docs are clear enough to get the general idea, but I can't figure out how they are called.
I have this issue where I have a Unix timestamp (in seconds) that needs to display as a readable date in the UI, but be saved to the server in it's original format. Previously I was using the jQuery UI datepicker, and made a custom directive with $formatters and $parsers that would take care of the transformations. Worked great.
Then I decided to ditch the jQuery to lighten the payload of the app, and so have switched to using ngQuickDate ( https://github.com/adamalbrecht/ngQuickDate ) which is great actually.
BUT it has it's own pipeline of $formatters and $parsers, and relies on a js Date object residing in the model. :p
I've been banging my head on this all day trying to figure out if my directive could play nice with this other one. It stands to reason that I should be able to put my directive there and have my parsing and formatting functions inject into the pipeline and work as expected, except that the date picker directive directly references $modelValue in several places and so actually bypasses the pipeline as far as I can tell.
Is there a way to make reference the value as transformed by my formatter, rather than the direct modelValue? I tried viewValue but that didn't work. :p
I don't really understand how the formatters and parsers get invoked I guess. That's my main question.