Closed osvathrobi closed 5 years ago
One hack-fix is to move this code from the self.render
method into the self.show
method right before triggering self.onshow
:
if (self.popover) {
var wrapper = angular.element('<div></div>');
wrapper.append(self.editorEl);
self.editorEl = wrapper;
$templateCache.put('popover.html', self.editorEl[0].outerHTML);
}
This will fix both the missing class names and creating the bsdate controls.
@osvathrobi what do you mean by "hack-fix". Do you think this should be fixed in a different way that what you posted?
@ckosloski I use this in production for over a year and it seems to be working fine. I meant "hack-fix" as in - it is not an official response from the contributors.
My other controls are working fine within the popover except the date picker. Only the Submit and Cancel buttons appear in the popover.
This seems to be the same reason why form-control class isn't added to inputs within a ui-popover.
$templateCache.put('popover.html', self.editorEl[0].outerHTML)
is used in the code to pass it over to the popover but the control hasn't finished being creating yet. (hacking in a setTimeout for this assignment fixes the issue, so I can confirm it is related to this)