date format - Local System DateFormat in javaScript -
i have searched forum. got close answers , able partly solve problem facing, need little more clarity whether possible or available option there. problem below.
i using sap ui5. have datepicker in 1 screen , there date pattern shown using code below:
this._enddatepicker = new mii.control.miidatepicker({ value: { path: "/datevalue", type: new sap.ui.model.type.date({ pattern: "mm-dd-yyyy" })} });
so shows 08-29-2000
but want show dates per local pc/system date; if date shown in toolbar 2000-08-29, in screen needs show in same format. have used below code:
this._enddatepicker = new mii.control.miidatepicker({ value: { path: "/datevalue", type: new sap.ui.model.type.date({ setlocal:olocale })} });
but here problem: taking longdate
format. if long date format dd-mmmm-yyyy
shows 29,august 2000. date
in toolbar in short date format dd-mm-yyyy
, need display on screen.
are there options or ways show same?
this._enddatepicker = new mii.control.miidatepicker({ value: { path: "/datevalue", type: new sap.ui.model.type.date({ setlocal: olocale }), // can specify style long/short/medium/full formatoptions: { style: 'medium' } } });
Comments
Post a Comment