fix bug display current openingDate in datepicker

This commit is contained in:
2022-01-28 17:36:59 +01:00
parent cb17a7e8a5
commit fe4eaa92be
2 changed files with 15 additions and 14 deletions

View File

@@ -17,7 +17,7 @@
<script>
import { datetimeToISO, ISOToDate} from 'ChillMainAssets/chill/js/date.js';
import { datetimeToISO, dateToISO, ISOToDate, ISOToDatetime} from 'ChillMainAssets/chill/js/date.js';
import { mapState, mapGetters } from 'vuex';
export default {
@@ -37,13 +37,14 @@ export default {
},
},
computed: {
startDate() {
console.log(datetimeToISO(this.$store.state.accompanyingCourse.openingDate))
return datetimeToISO(this.$store.state.accompanyingCourse.openingDate)
}
// ...mapState({
// startDate: state => dateToISO(state.accompanyingCourse.openingDate)
// })
// startDate() {
// const date = ISOToDatetime(this.$store.state.accompanyingCourse.openingDate.datetime)
// console.log(dateToISO(date))
// // return datetimeToISO(this.$store.state.accompanyingCourse.openingDate)
// }
...mapState({
startDate: state => dateToISO(ISOToDatetime(state.accompanyingCourse.openingDate.datetime))
})
}
}