[datepicker] date is selected by enter key, tab index focusing window ,so i modified some changes in code
$scope.keydown = function( evt ) {
var key = $scope.keys[evt.which];
if ( !key || evt.shiftKey || evt.altKey ) {
return;
}
evt.preventDefault();
if(!self.shortcutPropagation){
evt.stopPropagation();
}
if (key === 'enter' || key === 'space') {
if ( self.isDisabled(self.activeDate)) {
return; // do nothing
}
$scope.select(self.activeDate);
focusElement();
} else if (evt.ctrlKey && (key === 'up' || key === 'down')) {
$scope.toggleMode(key === 'up' ? 1 : -1);
focusElement();
} else {
self.handleKeyDown(key, evt);
self.refreshView();
}
};
}])
/**************************************/
$scope.select(self.activeDate);
focusElement();
after changing the code it working ,i have mention the code below /**************************************/
$scope.select(self.activeDate);
self.element[0].parentElement.parentElement.parentElement.previousElementSibling.focus();
please review the code and give your comments,please
We do not want to do anything like
self.element[0].parentElement.parentElement.parentElement.previousElementSibling.focus();
This is an antipattern, and is tied too heavily to DOM structure.
If you are proposing a modification, please file a pull request - it is difficult to do a code review otherwise.
Can you give any alternative solution for this please
https://github.com/angular-ui/bootstrap/blob/master/CONTRIBUTING.md#you-think-youve-found-a-bug - the minimum bar has not been met for anyone to even tackle this, since the problem is not well-defined.