8000 [Vue] date picker viewDate property is not kept up to date by diosmosis · Pull Request #18385 · matomo-org/matomo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Vue] date picker viewDate property is not kept up to date #18385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files. 10000
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions plugins/CoreHome/vue/dist/CoreHome.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/CoreHome/vue/dist/CoreHome.umd.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { defineComponent, watch, ref } from 'vue';
import JQuery = JQuery;
import DatePicker from '../DatePicker/DatePicker.vue';
import Matomo from '../Matomo/Matomo';
import Periods from '../Periods/Periods';
import { Periods, parseDate } from '../Periods';

const piwikMinDate = new Date(Matomo.minDateYear, Matomo.minDateMonth - 1, Matomo.minDateDay);
const piwikMaxDate = new Date(Matomo.maxDateYear, Matomo.maxDateMonth - 1, Matomo.maxDateDay);
Expand Down Expand Up @@ -83,10 +83,12 @@ export default defineComponent({
function onChanges() {
if (!props.period || !props.date) {
selectedDates.value = [null, null];
viewDate.value = null;
return;
}

selectedDates.value = getBoundedDateRange(props.date);
viewDate.value = parseDate(props.date);
}

watch(props, onChanges);
Expand Down
0