SyntaxFix
Write A Post
Hire A Developer
Questions
Use a directive which adds to both the $formatters and $parsers collections to ensure that the transformation is performed in both directions.
See this other answer for more details including a link to jsfiddle.