2

I'm trying to show the current date and time using this:

var currentDate = new Date();

and then the code below to update my label, which did not work:

var controller = this;
var refs = controller.getReferences();

refs.dateLabelId.text.setValue = currentDate;

dateLabelId is the reference of my label


PROBLEM SOLVED

refs.dateLabelId.label.setText(currentDate)
C.Champagne
  • 5,381
  • 2
  • 23
  • 35
chnselim
  • 244
  • 1
  • 3
  • 16

2 Answers2

2

problem is solved with:

refs.dateLabelId.label.setText(currentDate)
chnselim
  • 244
  • 1
  • 3
  • 16
2

you can also update field label like this :

refs.dateLabelId.setFieldLabel(currentDate);