Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onConfirm receives all zero values #26

Closed
hugochinchilla opened this issue May 17, 2024 · 2 comments
Closed

onConfirm receives all zero values #26

hugochinchilla opened this issue May 17, 2024 · 2 comments

Comments

@hugochinchilla
Copy link

hugochinchilla commented May 17, 2024

No matter what value I select on the modal, the onConfirm callback always receives all zeros.

This is how I'm using it:

<TimerPickerModal
    visible={showCancelTimePicker}
    initialValue={{
        hours: cancelTime.getHours(),
        minutes: cancelTime.getMinutes(),
        seconds: 0,
    }}
    setIsVisible={setShowCancelTimePicker}
    onConfirm={(pickedDate) => {
        console.warn("SAVING!");
        console.log(pickedDate, "pick");
        setShowCancelTimePicker(false);
    }}
    modalTitle="Margen de cancelación"
    confirmButtonText={"Guardar"}
    hideCancelButton={true}
    onCancel={() => setShowCancelTimePicker(false)}
    closeOnOverlayPress
    hideSeconds={true}
    styles={{
        theme: "light",
    }}
/>
@troberts-28
Copy link
Owner

Thank you for reporting this @hugochinchilla. It was a knock-on of a big refactor I did in the previous version.

Now fixed in v1.8.1!

@hugochinchilla
Copy link
Author

Thank you, I will try it this weekend and report if I find any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants