我在项目中添加了Air Date选择器。默认情况下,插件的语言为俄语。
按照文档的说明,我尝试将其更改为英语,但仍然是俄语。
$('.datepicker-here').datepicker({
language: 'en',
minDate: new Date()
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/air-datepicker/2.2.3/css/datepicker.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/air-datepicker/2.2.3/js/datepicker.min.js"></script>
<input type='text' class='datepicker-here' data-language='en' />
还有其他人遇到同样的问题吗?
答案 0 :(得分:0)
我需要导入英语
https://cdnjs.cloudflare.com/ajax/libs/air-datepicker/2.2.3/js/i18n/datepicker.en.min.js
好,自从我上次使用它以来,它已经发生了很大变化。
答案 1 :(得分:0)
需要使用en
语言环境-https://cdnjs.cloudflare.com/ajax/libs/air-datepicker/2.2.3/js/i18n/datepicker.en.js添加单独的文件:
$('.datepicker-here').datepicker({
language: 'en',
minDate: new Date()
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/air-datepicker/2.2.3/css/datepicker.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/air-datepicker/2.2.3/js/datepicker.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/air-datepicker/2.2.3/js/i18n/datepicker.en.js"></script>
<input type='text' class='datepicker-here' data-language='en' />