M
M
Michael2016-10-15 12:15:37
opencart
Michael, 2016-10-15 12:15:37

update datetimepicker bootstrap how to make friends with bootstrap 4?

Opencart v.2.3
Bootstrap v.4
jQuery v.3
moment.js v.2.15.1
bootstrap-datetimepicker v. 4.17.42
Calendar buttons do not respond after update (datetimepicker)
Where to dig? it's the CSS or the jquery or the javascript in the template files or in the controllers.
or BS 4 is not compatible with the BS 3 datetimepicker,
maybe someone knows how to tie xdsoft.net/jqplugins/datetimepicker to
Opencart
in the OC admin panel, there is a default BS 3, Jquery, etc.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alams Stoyne, 2017-10-31
@alams_stoyne

Suddenly it's still relevant for you: https://tempusdominus.github.io/bootstrap-4
UPD: A solution was also found for the standard "bootstrap-datetimepicker"
The whole thing turned out to be that Bootstrap v.4 replaced "collapse in" with "collapse show " because what was previously in the datetimepicker did not work.
Solution: Edit the file bootstrap-datetimepicker.js (or bootstrap-datetimepicker.min.js )
Find:
We replace with:
We also find:

expanded = $parent.find('.in'),
closed = $parent.find('.collapse:not(.in)'),

And replace with:
expanded = $parent.find('.show'),
closed = $parent.find('.collapse:not(.show)'),

And finally, we find:
} else { // otherwise just toggle in class on the two views
expanded.removeClass('in');
closed.addClass('in');

And replace with:
} else { // otherwise just toggle in class on the two views
expanded.removeClass('show');
closed.addClass('show');

Save and check! PROFIT!!!
Ps Due to the fact that there is no stable version of Bootstrap v.4 yet, I keep Bootstrap with me =)

I
iBird Rose, 2016-10-15
@iiiBird

well, until they update the datepicker under bt4 - no way) and given that this datepicker has not been updated for a long time - I think this will not happen. use another. Which one then? I myself xs) myself in search of datapicker norms)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question