Sorry, I am new and still learning
I have a problem and I cant to solve it by my self. So, I hope you can help me.
<hr />
I want to put 2 datepicker in one page with 2 different controllers.
this is my code:
AppTextField {
id: picker1
....
onClicked: {
nativeUtils.displayDatePicker()
}
Connections {
target: nativeUtils
onDatePickerFinished: {
var d = date.toLocaleString(Qt.locale(),"dd/MM/yyyy")
if (accepted) txtDate1.text = d
}
}
}
AppTextField {
id: picker2
....
onClicked: {
nativeUtils.displayDatePicker()
}
Connections {
target: nativeUtils
onDatePickerFinished: {
var d = date.toLocaleString(Qt.locale(),"dd/MM/yyyy")
if (accepted) txtDate2.text = d
}
}
}
The problem is, when I have picked date in picker1, then the picker2 is fired too and will give same date as picker1. vice versa.
I have read the documentation but I cant understand it well. I dont know too how to make it or implement it as an item property. So, I think, asking is better.
Maybe someone can explain to me. So for the future, I can be smarter than today.
Thanks 😉