简体   繁体   English

smalot / bootstrap-datetimepicker导航箭头丢失

[英]smalot/bootstrap-datetimepicker navigation arrows missing

I'm having problems getting the arrows showing in the Bootstrap3 version of DateTime Picker ( https://github.com/smalot/bootstrap-datetimepicker ). 我在获取DateTime Picker的Bootstrap3版本中显示的箭头时遇到问题( https://github.com/smalot/bootstrap-datetimepicker )。

The example provided with the download is also missing the arrows, but the bootstrap2 example has them. 下载随附的示例也缺少箭头,但是bootstrap2示例具有箭头。

Everything else is working correctly and clicking the location where the arrows should be navigate as expected. 其他所有工作均正常进行,然后单击箭头应按预期导航的位置。 I'm assuming that the browser is searching for the icons and they're where they're supposed to be. 我假设浏览器正在搜索图标,并且它们应该在该位置。

Wondering if anyone has run into this issue and knows how to fix it? 想知道是否有人遇到此问题并知道如何解决? Otherwise maybe some suggestions as to how to troubleshoot would be appreciated. 否则,也许将对一些有关如何进行故障排除的建议表示赞赏。

This issue was resolved with a recent update to the repo. 通过对仓库的最新更新已解决了该问题。 Otherwise, searching and replacing the following lines in ../bootstrap-datetimepicker.js has the same effect: 否则,搜索并替换../bootstrap-datetimepicker.js中的以下行具有相同的效果:

Replace: 更换:

    headTemplateV3:   '<thead>' +
                          '<tr>' +
                          '<th class="prev"><i class="icon icon-arrow-left"></i> </th>' +
                          '<th colspan="5" class="switch"></th>' +
                          '<th class="next"><i class="icon icon-arrow-right"></i> </th>' +
                          '</tr>' +
        '</thead>',

with: 与:

headTemplateV3:   '<thead>'+
                        '<tr>'+
                            '<th class="prev"><i class="glyphicon glyphicon-arrow-left"/></th>'+
                            '<th colspan="5" class="switch"></th>'+
                            '<th class="next"><i class="glyphicon glyphicon-arrow-right"/></th>'+
                        '</tr>'+
                    '</thead>',

This drove me crazy for a while. 这使我发疯了一段时间。 The solution I found was to search the timepicker.js file for 'chevron' and change to the correct bootstrap format: 我发现的解决方案是在timepicker.js文件中搜索“ chevron”并更改为正确的引导格式:

I was going to post an image but stackoverfow won't let me :( 我打算发布图片,但是stackoverfow不会让我:(

So, search timepicker.js for 'chevron' and replace this: 因此,在timepicker.js中搜索“雪佛龙”并替换为:

<i class="icon-chevron-down"></i>

with this: 有了这个:

<i class="glyphicon glyphicon-chevron-down"></i>

只需检查您的minDatemaxDate选项是否正确,因为如果它们不正确,可能会丢失箭头

I was hosting the material-icon files locally.. this gave me serious issues. 我在本地托管材料图标文件。这给了我严重的问题。 As soon as I defaulted back to the old link rel (snippet below), all IE problems were resolved... 一旦我默认回到旧的链接rel(下面的代码段),所有IE问题都得到解决...

Not sure what causes it. 不知道是什么原因造成的。

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

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

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