onChange doesn't get triggered for LmDatepicker on iOS and Android
mohamadchehab opened this issue · comments
Moe commented
When using LmDatepicker on Web, the onChange function gets triggered which allows me to use a setDate function and update the date. However, on iOS and Android, this function doesn't get triggered so the component is not usable. Please let me know if any fix is available soon. Thanls.
Dominic Garms commented
this issue is a duplicate of #39 and it should be resolved in the most recent version?
Moe commented
Hi,
I was able to resolve the issue by adding a add a
useEffect(()=>{onChange(state),[state]) to the LmDatepicker.native.js file
Thanks for getting back to me
Mohamad
…On Thu, Dec 21, 2023, 10:59 AM Dominic Garms ***@***.***> wrote:
this issue is a duplicate of #39
<#39> and it should
be resolved in the most recent version?
—
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC4QLPMCCTJ7AMSYWVDKTUDYKRTHFAVCNFSM6AAAAABA52CMGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRWGY2DOOBWGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
Dominic Garms commented
@mohamadchehab thats part of the latest release already: https://github.com/dohomi/tamagui-kitchen-sink/blob/master/packages/date/src/datepicker/LmDatepicker.native.tsx#L36