How to handle DatePicker in React Native iOS Application?

I am working on a iOS application developed in React Native which includes some scenario where we have to handle DatePicker but It seems like datepicker object class (XCUIElementTypeOther) is different as in other iOS application (UIDatePickerWheel)

Can anyone suggest how to handle this (snapshot attached ) ?

Hi,

Looks like this is a developer issue not Appium issue. In my application too have date selection and its working fine.

Ask the dev team to make element as “XCUIElementTypePickerWheel” and sendKeys or setValues method will work.

//code:
@iOSFindBy(className = “XCUIElementTypePickerWheel”)
private List iosDatePickerWheel;

iosDatePickerWheel.sendKeys(keys)
iosDatePickerWheel.setValue(keys)

Regards
Blogger

Hey,

Do you know how to change the type for React Native DatePickerIOS control? As we are using React Native we don’t have extend for the control I guess.

Thank you.

You can find the react native date picker for iOS here:

Note the section here though:

Please note that this library currently exposes functionality from UIDatePicker on iOS and DatePickerDialog + TimePickerDialog on Android.

These native classes offer only limited configuration, while there are dozens of possible options you as a developer may need. It follows that if your requirement is not supported by the backing native views, this libray will not be able to implement your requirement. When you open an issue with a feature request, please document if (or how) the feature can be implemented using the aforementioned native views. If those views do not support what you need, such feature requests will be closed as not actionable.