Skip to Content
0

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

Nov 09, 2016 at 05:51 PM

17

avatar image

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);
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers