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

endDate doesn't seem to be reactive #128

Closed
asticode opened this issue Aug 28, 2023 · 5 comments
Closed

endDate doesn't seem to be reactive #128

asticode opened this issue Aug 28, 2023 · 5 comments

Comments

@asticode
Copy link

asticode commented Aug 28, 2023

Hi 👋

And thanks for this awesome svelte component!

I'm using the endDate attribute and I want it to be reactive (I have 2 datetime pickers, and once I select a value in the first one, I want the endDate in the second one to be updated), however it doesn't seem to be reactive.

Is it something desired?

Cheers
Quentin

@mskocik
Copy link
Owner

mskocik commented Aug 28, 2023

It is reactive, maybe you have it wrong in your code. Here is working example:

<script>
	import SveltyPicker from 'svelty-picker';

	let valOne;
</script>

Restricted selection list:<br>
<SveltyPicker bind:value={valOne} />
<br>
<SveltyPicker endDate={valOne} />

image

@asticode
Copy link
Author

I was not using the latest version since I had the same issue as this one but when using the latest version it works properly.

However, to fix the error Failed to resolve entry for package "svelty-picker". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "svelty-picker" package I needed to add "default": "./dist/index.js", to the exports > . key in the package.json. Would you be open to make that change in the package.json? I could make a PR if you prefer.

@mskocik
Copy link
Owner

mskocik commented Aug 29, 2023

Thanks for pointing out the issue with exports definition - I added it and released new version (4.1.3).

@rakshay905
Copy link

Thanks for the update, will try it

@asticode
Copy link
Author

Everything works like a charm for me ❤️

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

3 participants