Emu
Emu

Reputation: 5905

bootstrap datepicker not localizing

I've used bootstrap datepicker on my rails application. I've added the bootstrap-datepicker.js and bootstrap-datepicker.de.js to my app/assets/javascripts folder. On my view page I've added the following code:

<input type="text" class="datepicker form-control"/>

<script>
$('.datepicker').datepicker({
            language:'de',
            format: 'dd-mm-yyyy',
            startDate: '-3d'
        });
</script>

The problem is that, datepicker always shows the default(English) Month,Day name instead of showing the Month and Day names in German. Any idea what I'm doing wrong?

Upvotes: 0

Views: 733

Answers (2)

Mehmet Daşdemir
Mehmet Daşdemir

Reputation: 23

locales/

<script src="locales/bootstrap-datepicker.de.min.js" charset="UTF-8"></script>

Upvotes: 1

Jos&#233; Pinto
Jos&#233; Pinto

Reputation: 686

Your are probably missing <script src="js/bootstrap-datepicker.de.js></script> on your html file.

Upvotes: 0

Related Questions