10

i have successfully selected date and time in my react app using a react-native-modal-datetime-picker it worked smooth i want a picker in which i can select month and year only:

Month & Year Picker

How can I add a month and year picker?

i tried to find examples and any tutorial which can help but didn't find any relative to my problem.

James Z
  • 12,209
  • 10
  • 24
  • 44
Bilal Shaikh
  • 115
  • 1
  • 3
  • 10

1 Answers1

-4

Maybe look at https://github.com/beefe/react-native-picker.

Allows you to have multiple columns of selections in one like so:

enter image description here

Example code looks like this:

Picker.init({
    pickerData: data,
    selectedValue: [59],
    onPickerConfirm: data => {
        console.log(data);
    },
    onPickerCancel: data => {
        console.log(data);
    },
    onPickerSelect: data => {
        console.log(data);
    }
});
Picker.show();
Sam
  • 2,540
  • 2
  • 23
  • 24