Fix, date picker would not change the date.
This commit is contained in:
Vendored
+21
@@ -29,5 +29,26 @@
|
|||||||
"PYTHONUNBUFFERED": "1"
|
"PYTHONUNBUFFERED": "1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Python: FastAPI (Live Reload)",
|
||||||
|
"type": "debugpy",
|
||||||
|
"request": "launch",
|
||||||
|
"module": "uvicorn",
|
||||||
|
"args": [
|
||||||
|
"brewman.main:app",
|
||||||
|
"--host",
|
||||||
|
"0.0.0.0",
|
||||||
|
"--port",
|
||||||
|
"9998",
|
||||||
|
"--reload"
|
||||||
|
],
|
||||||
|
"cwd": "${workspaceFolder}/brewman",
|
||||||
|
"subProcess": true,
|
||||||
|
"justMyCode": true,
|
||||||
|
"envFile": "${workspaceFolder}/.env",
|
||||||
|
"env": {
|
||||||
|
"PYTHONUNBUFFERED": "1"
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
@@ -50,14 +50,14 @@ export class EmployeeFunctionsComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
chosenYearHandler(normalizedYear: moment.Moment) {
|
chosenYearHandler(normalizedYear: moment.Moment) {
|
||||||
const ctrlValue = this.creditSalaryModel().date ?? moment();
|
const ctrlValue = moment(this.creditSalaryModel().date);
|
||||||
ctrlValue.year(normalizedYear.year());
|
ctrlValue.year(normalizedYear.year());
|
||||||
ctrlValue.date(ctrlValue.daysInMonth());
|
ctrlValue.date(ctrlValue.daysInMonth());
|
||||||
this.creditSalaryModel.update((m) => ({ ...m, date: ctrlValue }));
|
this.creditSalaryModel.update((m) => ({ ...m, date: ctrlValue }));
|
||||||
}
|
}
|
||||||
|
|
||||||
chosenMonthHandler(normlizedMonth: moment.Moment, datepicker: MatDatepicker<moment.Moment>) {
|
chosenMonthHandler(normlizedMonth: moment.Moment, datepicker: MatDatepicker<moment.Moment>) {
|
||||||
const ctrlValue = this.creditSalaryModel().date ?? moment();
|
const ctrlValue = moment(this.creditSalaryModel().date);
|
||||||
ctrlValue.month(normlizedMonth.month());
|
ctrlValue.month(normlizedMonth.month());
|
||||||
ctrlValue.date(ctrlValue.daysInMonth());
|
ctrlValue.date(ctrlValue.daysInMonth());
|
||||||
this.creditSalaryModel.update((m) => ({ ...m, date: ctrlValue }));
|
this.creditSalaryModel.update((m) => ({ ...m, date: ctrlValue }));
|
||||||
|
|||||||
Reference in New Issue
Block a user