I'm trying to create a custom "range" directive that uses ng-model and only triggers model updates on blur.
To accomplish this, I combined two input[type=number] directives that use ng-model to take a min and a max value and format/parse a model that looks like "1 - 10". Then when I actually use the input I add ng-model-options={ updateOn: 'blur'} to so it should only trigger the update on blur.
The problem is that my model is never being updated, even on blur. It looks like the ng-change event gets triggered by the input on blur, but the $setViewValue of the custom directive doesn't send it through the parsers pipeline.
What exactly is going on here? The only "solution" i can figure out is to force a $commitViewValue in my onValueChange function, but that makes it so it commits it as soon as i blur any of the individual inputs, not the entire thing. Any ideas?