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

Selected date on minDate config change should be set on minDate value #107

Closed
thepill opened this issue Sep 10, 2018 · 7 comments
Closed
Labels
Milestone

Comments

@thepill
Copy link

thepill commented Sep 10, 2018

[x ] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe

Tell about your platform

  • jsfiddle

Current behavior
When updating the config with a new minDate, the selected date gets erased.

Expected behavior
When updating the config with a new minDate, the selected date should be updated to the new minDate value

Minimal reproduction of the problem with instructions
https://jsfiddle.net/qeLwag08/4/

Click on update min-date

@ankurk91
Copy link
Owner

i was able to reproduce the issue with plain js version.
see
https://jsfiddle.net/9qze7yj5/

You should report this to parent library instead.

@thepill
Copy link
Author

thepill commented Sep 10, 2018

thanks - i did: flatpickr/flatpickr#1500

lets see what happens :)

@thepill
Copy link
Author

thepill commented Sep 11, 2018

@ankurk91 Colud you take a look at flatpickr/flatpickr#1500 (comment)

Is it reasonable to add like a update-default-date-on-change prop to your component so it will than set the new default value?

@ankurk91
Copy link
Owner

Doing this already

this.fp.setDate(newValue, true);

It means you need to update v-model rather then defaultDate

@ankurk91
Copy link
Owner

@thepill
I am working on this issue. I think i am very close.

@ankurk91 ankurk91 reopened this Sep 11, 2018
ankurk91 added a commit that referenced this issue Sep 11, 2018
@ankurk91 ankurk91 added bug and removed invalid labels Sep 11, 2018
@ankurk91 ankurk91 added this to the 8.0.0 milestone Sep 11, 2018
@ankurk91
Copy link
Owner

@thepill
Please update to v8.0.0 and let me know

please see update fiddle -
https://jsfiddle.net/qeLwag08/14/

@thepill
Copy link
Author

thepill commented Sep 11, 2018

@ankurk91 seems to work 👍

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

No branches or pull requests

2 participants