angular-mighty-datepicker icon indicating copy to clipboard operation
angular-mighty-datepicker copied to clipboard

[BUG] Callback only called correctly when re-clicking it

Open Jaspur opened this issue 9 years ago • 0 comments

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>

Jaspur avatar Jun 22 '16 12:06 Jaspur