I am having a very strange issue in the IOS device for @react-native-community/datetimepicker while using "TIME" mode.
Whenever I change the time it automatically reverted back to the actual time, time reset on changing. Can you please guide how I can fix this issue?
NOTE: ITS ONLY HAVING ISSUE WITH IOS DEVICES.
Attach is the link to the snack so that you can check quickly.
To keep the date
you need to update the current date in the DatePicker in the onChange
callback function like this:
const onChange = (event, selectedDate) => {
const currentDate = selectedDate;
setDate(new Date(selectedDate));
....
}
You can check this fixed snack based on yours :D from here