vue-bootstrap-datetimepicker 中缺少指向下个月和上个月的箭头?

arrows to next and previous month are missing in vue-bootstrap-datetimepicker?

我正在使用这个 date picker,它工作正常但似乎缺少一些 CSS。我已经尝试了很多建议来使 css 工作,但没有成功。这是我当前的(相关)代码:

<template>
    <div class="row">
        <div class="col-lg-4">
            <div class="input-group">
                <date-picker
                        name="start-date"
                        ref="startDate">
                </date-picker>
                <div class="input-group-prepend">
                    <button class="btn btn-outline-primary" type="button" @click="$refs.startDate.dp.show()">
                        <font-awesome-icon icon="calendar-alt"></font-awesome-icon>
                    </button>
                </div>
            </div>
        </div>

        <div class="col-lg-4">
            <div class="input-group">
                <date-picker
                        name="end-date"
                        ref="endDate">
                </date-picker>
                <div class="input-group-prepend">
                    <button class="btn btn-outline-primary" type="button" @click="$refs.endDate.dp.show()">
                        <font-awesome-icon icon="calendar-alt"></font-awesome-icon>
                    </button>
                </div>
            </div>
        </div>
    </div>
</template>

<script>

    import datePicker from 'vue-bootstrap-datetimepicker';
    // Import date picker css
    import 'pc-bootstrap4-datetimepicker/build/css/bootstrap-datetimepicker.css';


    export default {
        name: "DateRange",
        components: {
            myDatePicker,
        },
        date: {
            startDate: '2019-10-10',
            endDate:   '2019-09-09'
        }
    }
</script>

这就是我的日期选择器的样子:

指向 next/previous 月份的箭头不可见,但它们工作正常。它们应该像许多示例一样可见 library shows。我检查了检查元素,它们没有被另一个对象或任何东西覆盖。未发现任何警告或错误。在尝试了 SO 上所有其他问题的所有建议后,我真的没有主意了。有什么方法可以让它们显示出来,或者如果没有,可能是自定义箭头 CSS 但不想走那条路。

在文档中,我发现 运行 这个选择器需要 bootstrap css。

我在上面提供的代码中看不到 bootstrap 导入,它应该类似于:

import 'bootstrap/dist/css/bootstrap.css';

请尝试导入这个或更新问题。

日期选择器使用字形图标作为箭头。你能检查一下你的网站是否导入了 "glyphicons-halflings-regular.woff" 文件吗?如果没有,请在 css

下面
@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/fonts/glyphicons-halflings-regular.woff'), url('http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/fonts/glyphicons-halflings-regular.woff') format('woff');}
}

您可以在 <script> 标签后添加以下内容,这将使自定义 CSS:

<style>
    i.custom-button-previous:before {
        content: "<<";
    }

    i.custom-button-next:before {
        content: ">>";
    }
</style>

这会将给定形状的箭头放在内容中缺少箭头的那两个地方

添加这个,它适合我。

<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>