Javascript

BootStrap Datetimepicker 汉化的实现代码

本文主要是介绍BootStrap Datetimepicker 汉化的实现代码,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

页面引用:

$('input[name=date-range]').daterangepicker({
      'applyClass' : 'btn-sm btn-success',
      'cancelClass' : 'btn-sm btn-default',
      locale: Config.daterangepicker_locale.zh_CN
});

daterangepicker汉化

/**
   * daterangepicker locale
   */
  daterangepicker_locale: {
    zh_CN: {
      applyLabel: '确定',
      cancelLabel: '取消',
      daysOfWeek: ["日","一","二","三","四","五","六"],
      monthNames: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]
    }
  }

datetimepicker汉化

/**
   * daterangepicker locale
   */
  daterangepicker_locale: {
    zh_CN: {
      days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
      daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
      daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"],
      months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
      monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
      today: "今天",
      suffix: [],
      meridiem: ["上午", "下午"]
    }
  }

以上所述是小编给大家介绍的BootStrap Datetimepicker 汉化的实现代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对找一找教程网网站的支持!

这篇关于BootStrap Datetimepicker 汉化的实现代码的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!