fix bug with month grid, remove logs
This commit is contained in:
Vendored
+2251
-2306
File diff suppressed because it is too large
Load Diff
@@ -65,17 +65,15 @@ export default class CalendarModel {
|
|||||||
year == date.getFullYear() && month == date.getMonth() + 1;
|
year == date.getFullYear() && month == date.getMonth() + 1;
|
||||||
|
|
||||||
// get data for offset
|
// get data for offset
|
||||||
date.setFullYear(year);
|
|
||||||
date.setMonth(month - 1);
|
|
||||||
date.setDate(1);
|
date.setDate(1);
|
||||||
|
date.setMonth(month - 1);
|
||||||
|
date.setFullYear(year);
|
||||||
|
|
||||||
const firstWeekdayOfMonth = date.getDay();
|
const firstWeekdayOfMonth = date.getDay();
|
||||||
const firstDayOfWeekSetting: number = parseInt(
|
const firstDayOfWeekSetting: number = parseInt(
|
||||||
this.settingsModel.firstDayOfWeek
|
this.settingsModel.firstDayOfWeek
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log(firstWeekdayOfMonth, firstDayOfWeekSetting);
|
|
||||||
|
|
||||||
const offset: number =
|
const offset: number =
|
||||||
firstWeekdayOfMonth < firstDayOfWeekSetting
|
firstWeekdayOfMonth < firstDayOfWeekSetting
|
||||||
? 7 - firstDayOfWeekSetting
|
? 7 - firstDayOfWeekSetting
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export default class FileTransferModel {
|
|||||||
|
|
||||||
// sending
|
// sending
|
||||||
sendFiles = (
|
sendFiles = (
|
||||||
directoryPaths: BuiltinIterator<string[]>,
|
directoryPaths: IteratorObject<string[]>,
|
||||||
callback: (path: string) => void
|
callback: (path: string) => void
|
||||||
): void => {
|
): void => {
|
||||||
for (const directoryPath of directoryPaths) {
|
for (const directoryPath of directoryPaths) {
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ export function MonthGrid<T>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const offsetElements: HTMLElement[] = [];
|
const offsetElements: HTMLElement[] = [];
|
||||||
console.log(monthGrid.offset);
|
|
||||||
for (let i = 0; i < monthGrid.offset; i++) {
|
for (let i = 0; i < monthGrid.offset; i++) {
|
||||||
offsetElements.push(<div></div>);
|
offsetElements.push(<div></div>);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"noImplicitAny": false,
|
||||||
|
"jsx": "react",
|
||||||
|
"jsxFactory": "React.createElement",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"target": "es2020",
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user