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

addDates empty array issue #256

Open
burzua opened this issue Oct 15, 2020 · 0 comments
Open

addDates empty array issue #256

burzua opened this issue Oct 15, 2020 · 0 comments

Comments

@burzua
Copy link

burzua commented Oct 15, 2020

When im try to add empty array i have error:
Uncaught Error: Empty array of dates received.
at Function.error (jquery-2.2.4.min.js:4)
at HTMLDivElement.addDates (jquery-ui.multidatespicker.js:321)
at HTMLDivElement.init (jquery-ui.multidatespicker.js:165)
at HTMLDivElement. (jquery-ui.multidatespicker.js:470)
at Function.each (jquery-2.2.4.min.js:4)
at n.fn.init.each (jquery-2.2.4.min.js:4)
at n.fn.init.$.fn.multiDatesPicker (jquery-ui.multidatespicker.js:427)
at Object.success (darbografikai.php:114)
at i (jquery-2.2.4.min.js:4)
at Object.fireWith [as resolveWith] (jquery-2.2.4.min.js:4)

I create an object with an empty dates array. and I need to show that the calendar is empty. is it possible to fill adddates with an empty array?

$.each(response,function(i,j) { dates.push(j.date); });
// some times dates array can be empty
$('#datepicker').multiDatesPicker({
minDate: 0,
addDates: dates
})

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

1 participant