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

Multiple dates are not selected by default in edit form #29

Closed
varmad opened this issue Jun 25, 2019 · 3 comments
Closed

Multiple dates are not selected by default in edit form #29

varmad opened this issue Jun 25, 2019 · 3 comments

Comments

@varmad
Copy link

varmad commented Jun 25, 2019

Dear @adrienpoly,

I am using this plugin in my new project, I have a problem with multiple dates highlight in the edit form. The defaultDate data attribute is not working. Could you please help me with this.

Here am attaching the screenshot.

multiple_dates

Regards,
Varma

@adrienpoly
Copy link
Owner

hello @varmad

I had a quick look into it, defaultDate is a string in flatpickr. So maybe you could try to pass a string with the multiple dates rather than an array?

Adrien

@varmad
Copy link
Author

varmad commented Jun 26, 2019

Hello @adrienpoly

Yes, now it's working. Thank you so much for your quick reply.

I have noticed one more thing while selecting multiple dates from the date picker, by default comma and whitespace(", ") are added between the dates, so in edit form also you should populate the dates with the same format.

Example:
Create form:
2019-06-02, 2019-06-03, 2019-06-04(format from the calendar)

Edit form:
2019-06-02,2019-06-03,2019-06-04 (this format won't work)
2019-06-02, 2019-06-03, 2019-06-04 (this will work)

Varma

@varmad varmad closed this as completed Jun 26, 2019
@adrienpoly
Copy link
Owner

ok thanks for reporting it. I do plan to update this plugin shortly will look into this at that time

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