Markus/GrahamC: pass correct from/toDates to ES query