Hi
How can get today date in widget project?
I try this code but nothing!
var options = {};
var date = Gregorian.moment(options);
var CurrentDate = Gregorian.info(date, Time.FORMAT_SHORT);
var DateLabelStr = View.findDrawableById("DateLabel") as Text;
var MyCurrentDate = CalcSolarCalendar(
CurrentDate.year, CurrentDate.month,
CurrentDate.day); // Lang.format("$1$ $2$", [CurrentDate.day_of_week,
// CurrentDate.day]);
//DateLabelStr.locX = WatchUi.LAYOUT_HALIGN_CENTER;
// DateLabelStr.locY = WatchUi.LAYOUT_VALIGN_TOP + 5;
DateLabelStr.setFont(Graphics.FONT_MEDIUM);
DateLabelStr.setColor(Graphics.COLOR_WHITE);
DateLabelStr.setText(MyCurrentDate);
Best,