jquery-bootstrap-modal-steps icon indicating copy to clipboard operation
jquery-bootstrap-modal-steps copied to clipboard

Title is appended not replaced using bootstrap datepicker

Open robjens opened this issue 8 years ago • 3 comments

On 'focus' event of a bootstrap datepicker field

image

Looking at the code, last bit seems like you add a span each time instead of replace it. Is this intentional?

robjens avatar Mar 04 '16 11:03 robjens

Hmm so I do not get why it is firing on the BS datepicker events as well, when you put the .on calls as methods on the modal I provided. This is really the problem, shouldn't the show(n) and hidden be bound to ONLY that element?

BS3 documentation says: All modal events are fired at the modal itself (i.e. at the <div class="modal">). So why does it trigger on child elements as well?

robjens avatar Mar 04 '16 14:03 robjens

Got why the hidden didn't fire. There is something off in the names of the events:

You use show in concordance with hidden but these pairs are shown:hidden and show:hide so if I change the hidden to hide, it suddenly works. Now all I need to do is:

.on('show.bs.modal', function (e) {
  if (!$($modal.selector).is(e.target)) { return; }
})...

and use that with hide as well

robjens avatar Mar 04 '16 15:03 robjens

@robjens Can you explain a little more how did you fix this problem? I am unable to fix this with the above mentioned information!

AdilSarwarNU avatar Mar 23 '16 09:03 AdilSarwarNU