Handling two datepickers in a form with angularjs
Would something like that work better?

$scope.$watchGroup(['$scope.EndDateFrom', '$scope.EndDateTo'], function () {
  const FORMAT = 'MM/dd/yyyy';
  const dates = [];

  if (!angular.isUndefined($scope.EndDateFrom))
    dates.push($filter('date')(new Date($scope.EndDateFrom), FORMAT));

  if (!angular.isUndefined($scope.EndDateTo))
    dates.push($filter('date')(new Date($scope.EndDateTo), FORMAT));

  const expression = `expr://${dates.join(' and ')}`;
  console.log(expression);
  return expression;
});





Array.join() will help avoid branching. In your case we don't really save any branches, but in more complex cases it may save a lot.
I left angular.isUndefined(...) untouched since I don't know how different it is from the native JavaScript's analogue, but if it's equivalent you may want to use $scope.EndaDateFrom !== undefined instead.
Original return console.log is counter-intuitive. Is it returning a value, or logging it to the console, or both? I split that into two separate operations.
FORMAT is a reusable constant.
expr://${dates.join(' and ')} uses string interpolation to create result object.


Update 1

`expr://${dates.join(' and ')}`


in older versions of JavaScript should be replaced with a classic equivalent

'expr://' + dates.join(' and ')