angular-mighty-datepicker
angular-mighty-datepicker copied to clipboard
[BUG] Callback only called correctly when re-clicking it
See this video: https://www.dropbox.com/s/hjtunfqeimbyfny/strange.mov?dl=0
As you can see the callback only is returned correctly when clicking for the second time..
_callthis = function(day) {
var _from = $scope.date_from.format('YYYY-MM-DD');
var _to = $scope.date_to.format('YYYY-MM-DD');
if(_to != 'Invalid date')
{
console.info(_from);
console.info(_to);
}
}
$scope.options_date_from = {callback: _callthis}; // start: moment().add('day', 2),
$scope.options_date_to = {callback: _callthis};
This HTML
<mighty-datepicker ng-model="date_from" options="options_date_from" not-before="date_to"></mighty-datepicker>
<mighty-datepicker ng-model="date_to" options="options_date_to" after="date_from"></mighty-datepicker>