Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    Nov 02, 2016 at 06:00 PM

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

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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 31, 2016 at 08:17 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 02, 2016 at 05:07 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 02, 2016 at 09:55 PM

    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?.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 03, 2016 at 03:53 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 03, 2016 at 06:14 PM

    I think you can try this:

    in js file:

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

    Regards,

    Akhilesh

    Add comment
    10|10000 characters needed characters exceeded