Commit 4e42c4d5 authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Fixed schedule view not defaulting to current day

parent d0b610b5
......@@ -69,6 +69,7 @@ Kirigami.Page {
}
pathView.currentIndex = newIndex;
selectedDate = date;
console.log(selectedDate);
}
actions {
......@@ -128,7 +129,6 @@ Kirigami.Page {
root.startDate = currentItem.firstDayOfMonth;
root.month = currentItem.month;
root.year = currentItem.year;
root.initialMonth = false;
if(currentIndex >= count - 2) {
model.addDates(true);
......
......@@ -472,7 +472,7 @@ Kirigami.ApplicationWindow {
onMonthChanged: if(month !== root.selectedDate.getMonth() && !initialMonth) root.selectedDate = new Date (year, month, 1)
onYearChanged: if(year !== root.selectedDate.getFullYear() && !initialMonth) root.selectedDate = new Date (year, month, 1)
Component.onCompleted: setToDate(root.selectedDate)
Component.onCompleted: setToDate(root.selectedDate, true)
actions.contextualActions: createAction
}
......@@ -496,7 +496,7 @@ Kirigami.ApplicationWindow {
onMonthChanged: if(month !== root.selectedDate.getMonth() && !initialMonth) root.selectedDate = new Date (year, month, day)
onYearChanged: if(year !== root.selectedDate.getFullYear() && !initialMonth) root.selectedDate = new Date (year, month, day)
Component.onCompleted: setToDate(root.selectedDate)
Component.onCompleted: setToDate(root.selectedDate, true)
onAddIncidence: root.setUpAdd(type, addDate)
onViewIncidence: root.setUpView(modelData, collectionData)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment