final By calDob=By.id(“dob_tv”);
final By calMonthPicker=By.xpath("//android.widget.NumberPicker[@index=‘0’]");
final By calDayPicker=By.xpath("//android.widget.NumberPicker[@index=‘1’]");
final By calYearPicker=By.xpath("//android.widget.NumberPicker[@index=‘2’]");
use the above xpaths and send the required date using sendkeys in the locators.
here i am sending only year.
click(calDob,TimeEntity.SEC_5.getSeconds());
int year = Calendar.getInstance().get(Calendar.YEAR);
int pastDateYear = (year - 30);
MobileElement calYear= findElement(calYearPicker);
TimeManager.waitInSeconds(2);
clearAndType(Integer.toString(pastDateYear), calYear);
click(calBtn,TimeEntity.SEC_2.getSeconds());