I am using bootstrap-datepaginator which uses bootstrap-datepicker. Utilizzanto bootstrap-datepicker as one component, there is no problem setting the language, but the same is not true when using bootstrap-datepaginator. How can i do
I am trying to set the default Italian language for the whole project. In index.htmlI put the following script:
<script src="vendors/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="vendors/jquery-ui/ui/i18n/datepicker-it.js"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker( $.datepicker.regional[ "it" ] );
});
</script>
But in the console, I get the following errors:
Uncaught TypeError: Cannot read property 'regional' of undefined datepicker-it.js:15
Uncaught TypeError: Cannot read property 'regional' of undefined (index):394
I tried everything, but I'm going crazy!
Bootstrap Datepicker i18n
I changed the code like this:
<script src="vendors/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="vendors/bootstrap-datepicker/js/locales/bootstrap-datepicker.it.js"></script>
<script>
$(function() {
$.datepicker.setDefaults( $.datepicker.regional["it"] );
});
</script>
but now the error is as follows:
Uncaught TypeError: Cannot read property 'setDefaults' of undefined
With this fix:
$('.datepicker').datepicker({
language: "it"
});
I have no errors in the console, but the default language is English by default