让BOOTSTRAP-DATEPICKER控件支持中文 多语言
打开bootstrap-datepicker.js
找到下面的代码 添加红线内的代码
然后调用时候增加
anguage: 'zh-CN',即可实现
,
'zh-CN': {
days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
daysMin: ["日", "一", "二", "三", "四", "五", "六"],
months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
today: "今天",
monthsTitle: "选择月份",
clear: "清除",
format: "yyyy-mm-dd",
titleFormat: "yyyy年mm月",
weekStart: 1
}
![](https://img2018.cnblogs.com/blog/818001/202003/818001-20200306134924571-606254954.jpg)
实际调用
![](https://img2018.cnblogs.com/blog/818001/202003/818001-20200306134925154-448926694.jpg)
参考
实现
有需要也可以直接用这个git做好的多语言版本支持N多种语言