美文网首页
本地引入antd,时间设置为中文格式

本地引入antd,时间设置为中文格式

作者: Scoor | 来源:发表于2019-07-05 10:55 被阅读0次
<script src="__STATIC__/react/moment-with-locales.js"></script>
<script type="text/javascript">
  moment.locale('zh-cn');
  var locale={
        lang:{
            backToToday: "返回今天",
            clear: "清除",
            dateFormat: "YYYY年M月D日",
            dateSelect: "选择日期",
            dateTimeFormat: "YYYY年M月D日 HH时mm分ss秒",
            dayFormat: "D日",
            decadeSelect: "选择年代",
            month: "月",
            monthSelect: "选择月份",
            nextCentury: "下一世纪",
            nextDecade: "下一年代",
            nextMonth: "下个月 (翻页下键)",
            nextYear: "下一年 (Control键加右方向键)",
            now: "此刻",
            ok: "确 定",
            placeholder: "请选择日期",
            previousCentury: "上一世纪",
            previousDecade: "上一年代",
            previousMonth: "上个月 (翻页上键)",
            previousYear: "上一年 (Control键加左方向键)",
            rangePlaceholder: (2) ["开始日期", "结束日期"],
            timeSelect: "选择时间",
            today: "今天",
            weekSelect: "选择周",
            year: "年",
            yearFormat: "YYYY年",
            yearSelect: "选择年份",
        }
    }
</script >

相关文章

网友评论

      本文标题:本地引入antd,时间设置为中文格式

      本文链接:https://www.haomeiwen.com/subject/gfjshctx.html