Using locale to determine first day of week.

This commit is contained in:
Ruturaj Hagawane 2019-10-18 13:48:55 -04:00
Родитель 9063092e5f
Коммит 239d1a47d4
3 изменённых файлов: 9 добавлений и 0 удалений

5
package-lock.json сгенерированный
Просмотреть файл

@ -3967,6 +3967,11 @@
"minimist": "0.0.8"
}
},
"moment": {
"version": "2.24.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",

Просмотреть файл

@ -62,6 +62,7 @@
"@fullcalendar/interaction": "^4.1.0",
"@fullcalendar/react": "^4.1.0",
"@fullcalendar/timegrid": "^4.1.0",
"moment": "~2.24.0",
"react": "~16.8.1",
"react-dom": "~16.8.1"
},

Просмотреть файл

@ -27,6 +27,8 @@ import interactionPlugin from "@fullcalendar/interaction";
import FullCalendar from "@fullcalendar/react";
import timeGridPlugin from "@fullcalendar/timegrid";
import { localeData } from "moment";
import { AddEditDaysOffDialog } from "./AddEditDaysOffDialog";
import { AddEditEventDialog } from "./AddEditEventDialog";
import { ICalendarEvent } from "./Contracts";
@ -199,6 +201,7 @@ class ExtensionContent extends React.Component {
{ events: this.freeFormEventSource.getEvents },
{ events: this.vsoCapacityEventSource.getEvents }
]}
firstDay={localeData(navigator.language).firstDayOfWeek()}
header={false}
height={this.getCalendarHeight()}
plugins={[dayGridPlugin, timeGridPlugin, interactionPlugin]}