Hi,
I am using this library with Expo and it works when developing with Expo but when I build the standalone app, the datetimepicker keeps defaulting to the calendar display on any device. This is a serious bug because the calendar display is quite pathetic and confusing for a user who doesn't know that the year can be clicked. Its rather way straightforward to use the spinner.
I sincerely request the community to please fix this problem asap. It is a very serious problem, because I am relying on this to capture the date of birth of my users.
react-native info output:
# paste it here
Library version: x.x.x
Describe what you expected to happen:
Right, I still facing this issue.
@KyawSoeKhaing777 Do you think we should switch to DatePickerAndroid component from react-native till this issue is sorted? I believe that works correctly. At least won't stop us from making a release with Expo SDK 38
Issues that include all the information requested in the issue template are more likely to receive maintainers' attention. Most importantly, a reproducible code snippet is useful. You're also welcome to submit PRs fixing the raised issues.
Side note, switching back to deprecated code is likely not a good idea.
@luancurti Don't you think it's a better idea to give folks reporting issues some time after labelling as 'repro required' before closing the issue? It must be rather irritating for them to have them closed without a chance to update. I suggest we change the bot rule for this case.
Good point @rectified95 I agree with you. I'm reopening this issue.
@karanmartian Can you provide the correct information in the issue template and add a reproducible demo?
@luancurti I have spent a lot of time cracking my head to find an alternative since I know this would take time to fix here. So I switched to DatePickerAndroid and it finally works on the standalone app as expected.
I am using Expo SDK 38 and the reason I cannot provide you with a reproducible piece of code is because you will not be able to reproduce it if its not built into a standalone app via the Expo build service.
The issue again I would like to clarify is that your component works perfectly fine with the standard display = "spinner" prop set when testing it in development in Expo. However once I build the standalone app then no matter which device it is, always the calendar display will show and it will never show the spinner display inspite of setting display prop to "spinner".
So all I am saying is that if you can build a standalone app on Expo SdK 38 using this component and deploy it on a device you can straight verify why this issue is so critical. And worst come worst case if spinner cannot be done at least please change the idiotic default calendar display which is just not suitable for selecting date of birth. Its not clear to user that he can click on year to change year.
Best Regards,
In Earnest need of this fix,
Karan
Can confirm same issue. Can anyone explain what causes this different behavior occurring in standalone app vs running on expo client?
Same issue here
could someone help reproduce this issue? or have an idea how maintainers can help you?
Just create a react native expo app, include functionality to open a react-native-datepicker in it, specifying the picker mode should be 'spinner'. Then use expo service to build an android standalone app! Install it in android and invoke the date picker it wont be 'spinner'.
Any update on this?
@karanmartian this might help https://github.com/react-native-community/datetimepicker/issues/239#issuecomment-672906486
if that does not help, please open an issue in the expo repository, and you can link me in there - if changes are needed in this project in order for it to work with expo properly I would be open to doing that
Hey all, sorry for breaking this for you. I think https://github.com/expo/expo/pull/9706/commits/2dd6dd04a5104642f7282debf5cc5a56a6d8262a should fix the issue for SDK39+ which should ship soon. 🤞
Most helpful comment
@luancurti I have spent a lot of time cracking my head to find an alternative since I know this would take time to fix here. So I switched to DatePickerAndroid and it finally works on the standalone app as expected.
I am using Expo SDK 38 and the reason I cannot provide you with a reproducible piece of code is because you will not be able to reproduce it if its not built into a standalone app via the Expo build service.
The issue again I would like to clarify is that your component works perfectly fine with the standard display = "spinner" prop set when testing it in development in Expo. However once I build the standalone app then no matter which device it is, always the calendar display will show and it will never show the spinner display inspite of setting display prop to "spinner".
So all I am saying is that if you can build a standalone app on Expo SdK 38 using this component and deploy it on a device you can straight verify why this issue is so critical. And worst come worst case if spinner cannot be done at least please change the idiotic default calendar display which is just not suitable for selecting date of birth. Its not clear to user that he can click on year to change year.
Best Regards,
In Earnest need of this fix,
Karan