简体   繁体   中英

start antd RangePicker (datepicker) week from monday instead of sunday

i am using antd RangePicker to get start and end value of date. my calanders starts from sunday but i want to start it from monday

enter image description here

i have try this solution but nothing works

import { LocaleProvider, Calendar } from 'antd';
import en_GB from 'antd/lib/locale-provider/en_GB';
<LocaleProvider locale={en_GB}>
<Calendar
    dateFullCellRender={dateFullCellRender}
    onSelect={this.onSelect}
    defaultValue={this.state.selectedDate}
    ...
/></LocaleProvider>

From antd documentation here

import 'moment/locale/en-gb';
import locale from 'antd/es/locale/en_GB';
import moment from 'moment';

moment.locale('en-gb', {
  week: {
    dow: 1 /// Date offset
  }
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM