Skip to Content
0

DatePicke no working, sap.m.DatePicker is not a constructor?

Oct 31, 2016 at 05:31 PM

294

avatar image

Hi, Help me please, I am new to sapui5.

sap.m.DatePicker no workin,

displays the following error in the console. "Uncaught TypeError: sap.m.DatePicker is not a constructor ".

but all other controls work normally.

i working with sap.m library. and the JS view.

i download the framework sapui5 of http://www.sapui5.org/sapui5blogs/tools-sdk/

and i'm working in eclipse.

when I run my application in eclipse, sap.m.DatePicker no problems, display success but when I run my application in a bsp not recognize the Library sap.m.DatePicker.

be my sdk is not complete?

my code is:

var oDialog = new sap.m.Dialog("Dialog", {

title : "title test",

afterClose: function(oControlEvent){

sap.ui.getCore().getElementById('Dialog').destroy();

},

content:[

new sap.ui.layout.VerticalLayout({ content:[ new sap.m.Label("lbMaterial", {text: 'Material:'}),

new sap.m.Input("tfMaterial", { value: '100-300', editable: true, width: '200px' }),

new sap.m.Label("Cantidad", {text: 'Cantidad:'}),

new sap.m.Input("tfCantidad", { tooltip: 'Cantidad', value: '10', editable: true, width: '200px' }),

new sap.m.Label("lbFecha_entrega", {text: 'Fecha entrega:'}),

new sap.m.DatePicker("tfFecha_entrega",{ displayFormat : "short" });

.

.

.

as I can do to be recognized sap.m.DatePicker,

thanks.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Best Answer
Jun Wu Nov 02, 2016 at 06:00 PM
0

so you are working on a system which don't have ui5?

download from open ui5 http://openui5.org/

Share
10 |10000 characters needed characters left characters exceeded
Jun Wu Oct 31, 2016 at 08:17 PM
1

why you have to download sdk from sapui5.org???

Share
10 |10000 characters needed characters left characters exceeded
Julio Olivos Nov 02, 2016 at 05:07 PM
0

Start learning from this tutorial: https://blogs.sap.com/2012/12/07/building-a-crud-application-with-sapui5-and-icf-restjson-service-part-1/

and to use sapui5 had to create a bsp with the framework sapui5 to access libraries.

Share
10 |10000 characters needed characters left characters exceeded
Julio Olivos Nov 02, 2016 at 09:55 PM
0

ie the sdk sapui5 trial of sapui5.org does not contain all the libraries? or due to another reason the problem I have with sap.m.DatePicker?

I have to use openui5 mandatory?.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

of course no, if yes, how can u get that error

it is fake website

0
Julio Olivos Nov 03, 2016 at 03:53 PM
0

sorry, but http://www.sapui5.org/sapui5blogs/tools-sdk/ it's fake?? and there is some link where you can download the official sdk sapui5? please.


sapui5.jpg (184.5 kB)
Show 3 Share
10 |10000 characters needed characters left characters exceeded

already give u.

check my reply.

0

but this is openui5, i want sapui5.

0

do you know what is openui5?

0
Akhilesh Upadhyay Nov 03, 2016 at 06:14 PM
0

I think you can try this:

in js file:

jQuery.sap.require("sap.m.DatePicker")

Regards,

Akhilesh

Show 2 Share
10 |10000 characters needed characters left characters exceeded

in wich js, akhilesh?

0

where you are defining datepicker or may be in controller file.

0