mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Add some comments for trying to fullfil Moriz suggestion
This commit is contained in:
parent
24c763c00f
commit
59f415bd0a
@ -73,7 +73,7 @@ describe('ContributionForm', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('actual date', () => {
|
||||
describe.only('actual date', () => {
|
||||
describe('same month', () => {
|
||||
beforeEach(async () => {
|
||||
const now = new Date().toISOString()
|
||||
|
||||
@ -131,11 +131,18 @@ export default {
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
// sets the date to the 1st of the previous month
|
||||
minimalDate() {
|
||||
// sets the date to the 1st of the previous month
|
||||
const month = this.maximalDate.getMonth()
|
||||
const year = this.maximalDate.getFullYear()
|
||||
return new Date(year + (month === 0 ? -1 : 0), month === 0 ? 11 : month - 1, 1)
|
||||
|
||||
// // const date = new Date().setMonth(this.maximalDate.getMonth() - 1)
|
||||
// console.log(new Date('Mon Jan 10 2022 16:32:58 GMT+0100'))
|
||||
// const date = new Date('Mon Jan 10 2022 16:32:58 GMT+0100').setMonth(this.maximalDate.getMonth() - 1)
|
||||
// // console.log(date.toISOString())
|
||||
// console.log(new Date(date.getFullYear(), date.getMonth(), 1))
|
||||
// return new Date(date.getFullYear(), date.getMonth(), 1)
|
||||
},
|
||||
disabled() {
|
||||
return (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user