时间插件datepicker(jQuery-UI,bootstrap)和jquery-steps的冲突解决。。。

日期插件初始化:  $('.prelease_time').flatpickr();

let contentSteps = $("#content_form").steps({
            headerTag: "h3",
            bodyTag: "section",
            transitionEffect: "slideLeft",
            enableAllSteps: true,
            enablePagination: true,
            onStepChanging: function(event, currentIndex, newIndex) {
                console.log(11)
                return true;
            },
            onStepChanged: function(event, currentIndex, priorIndex) {
                console.log(22)
                return false;
            },
            onFinishing: function(event, currentIndex) {
                console.log(33)
                return true;
            },
            onFinished: function(event, currentIndex) {
                console.log(44)
                return false;
            }
        });

他们在渲染顺序上有区别,比如,jquery-steps是会重新渲染一遍DOM,此时需要再初始化datepicker即可

转载于:https://www.cnblogs.com/bug-master/p/7506010.html

你可能感兴趣的:(时间插件datepicker(jQuery-UI,bootstrap)和jquery-steps的冲突解决。。。)