uxsolutions / bootstrap-datepicker

A datepicker for twitter bootstrap (@twbs)
Apache License 2.0
12.68k stars 6.06k forks source link

Widget doesn't appear when using bootstrap-datepicker and X-Editable on the same modal dialog #2137

Open anibol opened 7 years ago

anibol commented 7 years ago

Expected behaviour

I'm using X-Editable plugin too on the same modal, not in the same input field, i expect the bootstrap-datepicker widget to appear when click on a input box

Actual behaviour

The calendar widget of bootstrap-datepicker doesn't not appears completly. I have used the .noconflict() method too.

Datepicker version used

Latest, tried befor on 1.6.x

Example code

(function ($) { $.fn.editable.defaults.mode = 'inline'; var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value $.fn.bootstrapDP = datepicker;

.....

$('#MyDateBox').bootstrapDP({
    todayBtn: "linked",
    autoclose: true,
    language: 'es'
});

}(jQuery));

Azaret commented 7 years ago

It looks like it is kinda working: https://jsfiddle.net/azaret/ohhkhd1t/17/
Tho you'll have issue with mixed css rules.

Unfortunately x-editable is shipped with an outdated version of datepicker. Not sure what their plan are for the future of x-editable, but we will happily work with @vitalets & co to found a quick solution on this matter.

vitalets commented 7 years ago

@MarQuisKnox

anibol commented 7 years ago

Hi, @Azaret what are the correct css rules? Can you give me some guidance while @vitalets corrects the problem? Thanks

MarQuisKnox commented 7 years ago

Hi, thanks for the report. I plan to remove all bundled plugins in a future release. Afterwards, any required plugins will need to be explicitly loaded. I will try to review this issue this week. Thanks for your patience.

Azaret commented 7 years ago

@anibol Few rules are the same. You could try to force the latest rules, for instance by adding body at the start of each rule, but then you'll break the inline date picker. I'm not sure there is an easy way out of this.