Able to scroll in date picker using scrollable class but it is not holding up on the text value which is passed in the method… Using this code
List<WebElement> dates = driver.findElements(
AppiumBy.androidUIAutomator("new UiSelector().resourceId(\"android:id/numberpicker_input\")"));
System.out.println(dates);
WebElement year = dates.get(2);
year.findElement(AppiumBy.androidUIAutomator(
"new UiScrollable(new UiSelector().scrollable(true).instance(2)).scrollIntoView(new UiSelector().text(\"2021\"))"));
WebElement month = dates.get(1);
month.findElement(AppiumBy.androidUIAutomator(
"new UiScrollable(new UiSelector().scrollable(true).instance(1)).scrollIntoView(new UiSelector().text(\"June\"))"));
WebElement date = dates.get(0);
date.findElement(AppiumBy.androidUIAutomator(
"new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(\"21\"))"));