I'm trying to use ionic range to set a period of time with a step of 15minutes. Ionic range works just like a common range input with min,max, step, value.
Here's the range html code:
<div class="item range">
<input type="range" min="0.15" max="12" value="0" step="0.15" ng-model="TimeValue" ng-change="setTime(TimeValue)">
</div>
And here's the function that i'm calling on change:
$scope.setTime = (value) ->
$scope.hours = Math.floor(value / 0.6);
$scope.minutes = value - ($scope.hours * 0.6);
Unfortunately, this is not working.
What I'm trying to achieve is a slider with a step of 0.15(minutes) that automatically creates an hour when it gets to 0.6 and than it starts again at 1.15(hours) and so on.
I'm following this answer here: using ionic range to set months and years but that's for years and months and the calculation is different.
Here's a quick demo: http://codepen.io/anon/pen/eZVPRv?editors=1010
EDIT