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

"getDate" returns "Invalid Date" if this.dates is empty #923

Closed
brumm opened this issue May 7, 2014 · 4 comments · Fixed by #1213
Closed

"getDate" returns "Invalid Date" if this.dates is empty #923

brumm opened this issue May 7, 2014 · 4 comments · Fixed by #1213
Assignees
Milestone

Comments

@brumm
Copy link

brumm commented May 7, 2014

This can happen if you're listening to changeDate and calling getDate and the user clicked on an already-selected date and toggled it off (Hopefully fixed soon).
Also happens if you plain call a = $("#sandbox-container input").datepicker("getDate") on the online-demo with no date selected.

@duncancumming
Copy link

+1
Getting this exact same issue. Problem seems to be _toggle_multidate removes the selected date from the this.dates array, leaving an empty array.
When it then triggers the changedate event, this.dates.get(-1) will return undefined.

@metz0r
Copy link

metz0r commented Jul 17, 2014

+1

1 similar comment
@sandebert
Copy link

+1

@acrobat
Copy link
Member

acrobat commented Dec 26, 2014

Can you guys confirm #1213 fixes this issue?

@acrobat acrobat added this to the 1.4.0 milestone Dec 26, 2014
@acrobat acrobat self-assigned this Dec 26, 2014
@acrobat acrobat mentioned this issue Dec 31, 2014
6 tasks
@Azaret Azaret mentioned this issue Oct 8, 2016
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants