nehakadam / AnyPicker

jQuery Picker Library for Android, iOS & Windows Phone. eg Date Picker, Time Picker, DateTime Picker, Custom Select etc

Home Page:https://nehakadam.github.io/AnyPicker/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get all AnyPicker instances

danielgasser opened this issue · comments

First of all, thank you very much for that handy plugin.

In my case there are multiple instances of AnyPicker which are created dynamically:

$(els[0]).AnyPicker({ ... });
$(els[1]).AnyPicker({ ... });
// ... and so on

Then I tried to add them to a global array (window.datePickerInstances) in different ways with no success:

window.datePickerInstances.push(
    $(els[0]).AnyPicker({ ... });
);
// ... and so on

or like so:

var instance = $(els[0]).AnyPicker({ ... });
// ...
window.datePickerInstances.push(instance);

All it saves in the array is the selector of the instance but not the instance itself.

How do I achieve that?

thx for your help
Daniel