Material-ui-pickers: Can I change KeyboardDatePicker month and year label format?

Created on 26 Nov 2019  Â·  5Comments  Â·  Source: mui-org/material-ui-pickers

Hi-Job Business 2019-11-26 14-46-47

Is there a way to change this month year format to something like 11月2019年?

Most helpful comment

https://material-ui-pickers.dev/guides/formats

Thank a lot for the information.

All 5 comments

Hi-Job Business 2019-11-26 14-46-47

Is there a way to change this month year format to something like 11月2019年?

can you change this ?

https://material-ui-pickers.dev/guides/formats
it's not
i change calendar format
pls HLP

https://material-ui-pickers.dev/guides/formats
it's not
i change calendar format
pls HLP

Screenshot

I was able to change the format. This is how I did it. I used MomentUtils not DateFnsUtils.

import "moment/locale/ja"; import MomentUtils from "@date-io/moment";

class LocalizedUtils extends MomentUtils {
  getCalendarHeaderText(date){
    return date.format("MM月YYYY年");
  }
}
<MuiPickersUtilsProvider locale="ja" utils={LocalizedUtils}>
<KeyboardDatePicker
     format="MM月DD日"
     //value={filterData.startDate}
     //onChange={this.changeStartDate}
    cancelLabel="キャンセル"
    okLabel="確定"
    />
</MuiPickersUtilsProvider> 

https://material-ui-pickers.dev/guides/formats

Thank a lot for the information.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dandv picture dandv  Â·  3Comments

filipenevola picture filipenevola  Â·  4Comments

harvitronix picture harvitronix  Â·  3Comments

StevenRasmussen picture StevenRasmussen  Â·  3Comments

danmce picture danmce  Â·  3Comments