Skip to Content

Answer - Archive SAPUI5 App: How to convert a date from DatePicker to week number and vis versa?

Hi.

  • I tried answer this archive question but don't show the answer button
  • You can use the picker with the following format in a xml view
  • <DatePickerwidth="100%"id="__picker0"displayFormat="ww-yyyy"valueFormat="ww-yyyy"secondaryCalendarType="Gregorian"/>
  • The week value can ber rear eith the following code
  • var view = this.getView();
    var
    myPicker = view.byId("__picker0");
    var myWeek = myPicker._lastValue;
  • The value assignation can be
  • var view = this.getView();
    var dateTo = new Date();
    var
    myPiker = view.byId("__picker0");
    myPiker.setDateValue(dateTo);
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers