I'm using TimePickerAndroid of React Native and using 12hours timing,
So, it is working fine and shows AM/PM to select and picker returned me hours and minutes, but I did not found anyway to get that AM is selected or PM, code is below.
async showTimePicker() {
const { action, minute, hour } = await TimePickerAndroid.open({
is24Hour: false,
});
if (action === TimePickerAndroid.dismissedAction) {
return;
}
const selectedTime = `${hour}:${minute}`;
this.setState({ selectedTime })
}
I just need to know that AM is selected or PM everything else is working fine.
official docs for reference.
Thank you.