Open adameska opened 7 years ago
+1
Also seeing conflicts with https://github.com/Eonasdan/bootstrap-datetimepicker. Name-spacing this stuff would make perfect sense.
is there a solution for that? have the same problem...
For those needing these plugins to run side by side and don't need to use the datepicker in your editable objects, delete lines 224 - 290 of the css/bootstrap-editable file to prevent conflicts. I don't recommend this, but it works for now until someone gets around to properly name-spacing these stylesheets.
I have found another workaround solution, which works for me (don't know why, I have no experience with css namespaces). I've added following line at the very beginning of bootstrap-editable.css
@namespace 'e';
I fixed it on Bootstrap-Datetimepicker.Js In the same theory, you can fix it on datepicker.js
showMode = function (dir) { if (!widget) { return; } if (dir) { currentViewMode = Math.max(minViewModeNumber, Math.min(3, currentViewMode + dir)); } widget.find('.datepicker > div').hide().filter('.datepicker-' + datePickerModes[currentViewMode].clsName).show(); }
Change to this:
showMode = function (dir) { if (!widget) { return; } if (dir) { currentViewMode = Math.max(minViewModeNumber, Math.min(3, currentViewMode + dir)); } widget.find('.datepicker > div').hide().filter('.datepicker-' + datePickerModes[currentViewMode].clsName).show(); // FINISH: Fix BUGS XEditable with Datetimepicker :) By NeV3RmI if (datePickerModes[currentViewMode].clsName == "days"){ widget.find('.datepicker > div:first-of-type').css('display', 'inherit'); } if (datePickerModes[currentViewMode].clsName == "months"){ widget.find('.datepicker > div:nth-of-type(2)').css('display', 'inherit'); } if (datePickerModes[currentViewMode].clsName == "years"){ widget.find('.datepicker > div:nth-of-type(3)').css('display', 'inherit'); } if (datePickerModes[currentViewMode].clsName == "decades"){ widget.find('.datepicker > div:nth-of-type(4)').css('display', 'inherit'); } // console.log(datePickerModes[currentViewMode].clsName); }
This control directly interferes with https://github.com/uxsolutions/bootstrap-datepicker can the CSS in this class be namespaced so we don't have that issue?