Change language for bootstrap DateTimePicker

前端 未结 11 1639
长发绾君心
长发绾君心 2020-12-03 04:15

I use bootstrap-datetimepicker.js Copyright 2012 by Stefan Petre

http://www.malot.fr/bootstrap-datetimepicker/index.php

I import the js and anot

11条回答
  •  遥遥无期
    2020-12-03 05:18

    For those who like me could not solve this problem with the solutions above, I sugest verifying if you initialize the $(element).datetimepicker(...) in different locations at the same time.

    In my case, after a long time, I found a global.js interfering with another datetimepicker initialization.

    If you need for some reason maintain work with different initializations, in different files, remember to remove the datetimepicker before each one with:

    $(element).datetimepicker('remove')

    Reference: https://www.malot.fr/bootstrap-datetimepicker/index.php#methods

    Edit: This solution still needs to import the language files correctly, right after the bootstrap-datetimepicker.js.

    I hope this helps!

提交回复
热议问题