Invert function in dateScale was not working correctly. Fixed