Material UI -Date Picker 汉化
根据产品的需求来对Date Picker日期选择器进行优化
废话不说,先来段代码
import React from 'react'
import DatePicker from 'material-ui/DatePicker'
function dateTimeFormat(locale, options) {
const dayAbbreviation = ['日', '一', '二', '三', '四', '五', '六'];
const dayList = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
const monthList = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
const monthLongList = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
this.format = function (date) {
//console.log(date,options,lo