Finding coordinates for a swipe is a separate problem. I will classify the problem as two separate groups of problems:
- Swipes that depend on the position of a particular UI element.
- Swipes that do not depend on the position of a particular UI element.
For swipes that depend on the position of a UI element, you are usually starting a swipe starting from the UI element's position. You can retrieve the position of the upper-left corner of the UI element by calling WebElement.getPosition(). This should return a Point object that contains the (x,y) coordinates of that corner.
For swipes that do not depend on the position of the UI element, you are usually starting and ending your swipe based on your screen (e.g. swiping from the bottom of the screen all the way to the top of the screen). For this, you can query the size of the screen by calling WebDriver.manage().options().window().getSize(), which will return a Dimension object containing the size of the screen.
Swiping, then, is just performing TouchActions (or using driver.swipe() for convenience) with the coordinates you retrieved and processed from Dimensions or Points.
A few notes: The positive y-axis points down on the screen. The origin of the device's xy-plane is located at the upper left-hand corner of your device. From your code you just pasted, this means that you are swiping from the top to the bottom, meaning you're trying to scroll the screen up. If you are at the top of the screen, then this should do nothing for most applications. If you know about the right-hand rule, this means your thumb (the positive z-axis) points into the screen.
Other notes: If your date picker is an Android native date picker, you can probably make it easier by clicking on the buttons available in the date picker, or typing in the dates for the individual fields, at least on devices with system versions older than Android 5.0. If your date picker is a completely custom date picker, you'll have to share some information about this date picker.