简体   繁体   English

带有bootstrap-datetimepicker的YADCF date_range过滤器无法正确显示

[英]YADCF date_range filter with bootstrap-datetimepicker not displaying correctly

I am using jquery-datatables-rails and the YADCF plugin in my rails app, and I would like to use the date_range filter type with the bootstrap-datetimepicker option, as I am using it elsewhere in the app. 我在rails应用程序中使用jquery-datatables-railsYADCF插件,并且我想在bootstrap-datetimepicker选项中使用date_range过滤器类型,因为我在应用程序的其他地方使用它。 However, when I use those options for a column: 但是,当我将这些选项用于列时:

{ column_number: 3, filter_reset_button_text: false, filter_type: 'range_date', datepicker_type: 'bootstrap-datetimepicker', date_format: 'M/D/YYYY' }

the widget does not display correctly, it looks like this: 小部件无法正确显示,如下所示:

bootstrap-datetimepicker显示不正确

What can I do to make this display correctly? 我该怎么做才能使此显示正确? Here is what it looks like elsewhere in my app, which is how I want it to look: 这是我应用程序中其他地方的外观,这就是我希望的外观:

bootstrap-datetimepicker正确

with the exception that I do not want the time to be selectable in this case, only the date. 除了在这种情况下我不想选择时间,只希望日期是可以选择的。

Any help would be much appreciated, thanks! 任何帮助将不胜感激,谢谢!

I found the answer here, hopefully this helps someone else trying to use jquery datatables and bootstrap-datetimepicker together - https://github.com/Eonasdan/bootstrap-datetimepicker/issues/958 我在这里找到了答案,希望这可以帮助其他尝试一起使用jquery数据表和bootstrap-datetimepicker的人-https: //github.com/Eonasdan/bootstrap-datetimepicker/issues/958

From that source: 从那个来源:

// Fix interference between jquery datatables and bootstrap datetimepicker
table.dataTable.table-condensed .bootstrap-datetimepicker-widget thead > tr > th {
    padding-right: 0;
 }
table.dataTable.table .bootstrap-datetimepicker-widget thead > tr > th {
  padding-right: 0;
}

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

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