nazar-pc / PickMeUp

Really simple, powerful, customizable and lightweight standalone datepicker
BSD Zero Clause License
615 stars 191 forks source link

pickmeup(...) with a selector only affects one element #185

Closed kjkrum closed 6 years ago

kjkrum commented 6 years ago

This only affects the first element matching the selector:

pickmeup(".fnord", {...});

I'm using this workaround to achieve the expected behavior:

$(".fnord").each(function () {
    pickmeup(this, {...});
});
nazar-pc commented 6 years ago

This is an intended behavior. pickmeup() call returns an object that you can use to control the instance. You can use jQuery or plain JavaScript to apply datepicker to multiple elements.