datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

feature: Imperative API for iOS

Open clicktodev opened this issue 1 year ago • 0 comments

Feature request

Why it is needed

Right now we can build a custom button on Android, but on iOS, we are forced to use the iOS button design. I would like to have a single custom button that launches both android and ios pickers.

Possible implementation

Exactly like the existing imperative android api. It would be possible to create something like this: https://github.com/henninghall/react-native-date-picker?tab=readme-ov-file#modal

Code sample

import { DateTimePickeriOS } from '@react-native-community/datetimepicker';

DateTimePickeriOS.open(params: iOSNativeProps)
DateTimePickeriOS.dismiss(mode: iOSNativeProps['mode'])

clicktodev avatar Jun 09 '24 22:06 clicktodev