bootstrap-datepicker icon indicating copy to clipboard operation
bootstrap-datepicker copied to clipboard

.datepicker('remove') does nothing.

Open danielbonnell opened this issue 9 years ago • 0 comments

Hello,

I'm trying to adapt this project for use in an app I'm building. I have a page where I dynamically initialize a number of elements, each with its own datepicker. I want to use the remove method to destroy a datepicker before a new one on a different element is initialized, however it's not working correctly. I know that this project isn't maintained any more, but I'm wondering if you can confirm that this is a bug or if I'm just doing something wrong.

I've tried multiple ways of destroying the current datepicker before initializing another, including:

$('.datepicker').remove();
$('.datepicker').off().remove();
$('.datepicker').datepicker('remove');
$('.datepicker').datepicker('destroy');

None of these seem to do the trick. When I try to reinitialize the datepicker on another element, nothing happens.

danielbonnell avatar Aug 05 '16 15:08 danielbonnell