简体   繁体   English

jquery 3.5.1 和 tempusdominus datetimepicker 不能一起工作

[英]jquery 3.5.1 and tempusdominus datetimepicker not working together

I am using this library:我正在使用这个库:
https://github.com/tempusdominus/bootstrap-4 https://github.com/tempusdominus/bootstrap-4

But after updating to jquery 3.5.1, I am facing this issue:但是在更新到 jquery 3.5.1 后,我遇到了这个问题:
https://github.com/tempusdominus/bootstrap-4/issues/164 https://github.com/tempusdominus/bootstrap-4/issues/164

The datepicker-days are not shown as expected. datepicker-days 未按预期显示。
Any one having the same issue or might have solved the problem?任何人有同样的问题或可能已经解决了这个问题?

As of today you can use this fork here which is updated and compatible with the latest version of jQuery.从今天开始,您可以在此处使用此分叉,它已更新并与最新版本的 jQuery 兼容。

The original tempusdominus/bootstrap-4 is unmaintained and this fork features a set of bugfixes and new features.原始tempusdominus/bootstrap-4未维护,此分支具有一组错误修复和新功能。

Installation安装

npm i --save tempusdominus-bootstrap tempusdominus

Usage用法

If you are using ES6, you can use the plugin in your code this way:如果您使用的是 ES6,则可以通过以下方式在代码中使用该插件:

import $ from "jquery";
import "tempusdominus-bootstrap";

$("#my-datetimepicker").datetimepicker({
  // Options...
});

If you are using React, you can also check out this library here.如果你使用 React,你也可以在这里查看这个库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM