为了账号安全,请及时绑定邮箱和手机立即绑定

已解决 - 未捕获类型错误:$(...).datetimepicker 不是 app.js:61

已解决 - 未捕获类型错误:$(...).datetimepicker 不是 app.js:61

撒科打诨 2023-01-06 11:22:17
已解决,但它仍然不会将数据时间格式从 MM-DD-YY 更改为 DD-MM-YY我正在寻找我的日期选择器错误的原因,但似乎没有任何效果。另外,我尝试将其设为 DD-MM-YY hh:mm,但它一直设为 MM-DD-YY。事件:     <div class="form-group">        <label>Fecha del evento:</label>          <div class="input-group date" id="reservationdate" data-target-input="nearest">              <input type="text" class="form-control datetimepicker-input" data-target="#reservationdate"/>              <div class="input-group-append" data-target="#reservationdate" data-toggle="datetimepicker">                  <div class="input-group-text"><i class="fa fa-calendar"></i></div>              </div>          </div>      </div>标题:  <!-- Font Awesome -->  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css">  <!--  rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">  <!-- overlayScrollbars -->  <link rel="stylesheet" href="css/adminlte.min.css">  <link rel="stylesheet" href="css/sweetalert2.min.css">  <link rel="stylesheet" href="css/admin.css">  <link rel="stylesheet" href="plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">  <link rel="stylesheet" href="plugins/datatables-responsive/css/responsive.bootstrap4.min.css">  <!-- daterange picker -->  <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker.css">  <!-- Select2 -->  <link rel="stylesheet" href="plugins/select2/css/select2.min.css">  <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">页脚:<!-- jQuery --><script src="plugins/jquery/jquery.min.js"></script><!-- Bootstrap 4 --><script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script><!-- DataTables --><script src="plugins/datatables/jquery.dataTables.min.js"></script><script src="plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script><script src="plugins/datatables-responsive/js/dataTables.responsive.min.js"></script><script src="plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
查看完整描述

1 回答

?
慕的地6264312

TA贡献1817条经验 获得超6个赞

您需要将脚本包含到 Bootstrap datetimepicker。像这样尝试:


<!-- jQuery -->

<script src="plugins/jquery/jquery.min.js"></script>

<!-- Bootstrap 4 -->

<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- DataTables -->

<script src="plugins/datatables/jquery.dataTables.min.js"></script>

<script src="plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>

<script src="plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>

<script src="plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>

<!-- AdminLTE App -->

<script src="js/adminlte.min.js"></script>


<!-- Categoria Evento -->

<!-- Select2 -->

<script src="plugins/select2/js/select2.full.min.js"></script>


<script type="text/javascript" src="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/src/js/bootstrap-datetimepicker.js"></script>


<!-- Fecha Evento -->

<!-- InputMask -->

<script src="plugins/moment/moment.min.js"></script>

<script src="plugins/inputmask/min/jquery.inputmask.bundle.min.js"></script>

<!-- Tempusdominus Bootstrap 4 -->

<script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>

<!-- date-range-picker -->

<script src="plugins/daterangepicker/daterangepicker.js"></script>


查看完整回答
反对 回复 2023-01-06
  • 1 回答
  • 0 关注
  • 112 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信