Skip to Content
Mar 08, 2021 at 03:12 PM

Biding datePicker


I'v got 2 date picker's in my project and I want to change one datePicker and change the other.

For some reason when I change one the other one didn't change.

Can you please help?!

This the one I attach an event -

<DatePicker id="docDueDeteId" width="10rem" change="onChangeNecessidadeGeral">
<OverflowToolbarLayoutData priority="NeverOverflow"/>

This is the one It will change after I change the first one:

<t:Column width="9rem" id="colDateId">
<Label text="Necessidade"/>
<DatePicker id="colDateId1" dateValue="{jModel>necessidade}"/>

In the controller:

onChangeNecessidadeGeral: function (oEvent) {
var data = oEvent.getSource().getDateValue();
var typeRequest = this.getView().byId("typeRequestId").getText();
var that = this;
var txtWarning = "Do you want to change in the other date fields?";
MessageBox.warning(txtWarning, {
actions: [MessageBox.Action.OK, MessageBox.Action.CANCEL],
emphasizedAction: MessageBox.Action.OK,
onClose: function (sAction) {
if (sAction !== "CANCEL") {
that.changeNecessidade(data, typeRequest);
changeNecessidade: function (data, typeRequest) {
var oView = this.getView();
if (typeRequest === "Artigo") {
} else if (typeRequest === "Serviço") {