I'm using the Ant Design Calendar Component in my project and I have it set up as follows:
Currently the Day of Week format is dd
. Eg. Su
, Mo
, Tu
, etc.
Is it possible to change the format via props to ddd
. Eg. Sun
, Mon
, Tue
, etc.?
There is no support for changing that directly on ant design component,
but Ant Design under the hood is using moment
which is using locale.weekdaysMin
, so you can import moment
and change them:
import moment from 'moment'
moment.updateLocale('en', {
weekdaysMin : ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With