cancel
Showing results for 
Search instead for 
Did you mean: 

Uncaught TypeError: d.getDay is not a function

Former Member
0 Kudos

Hi All,

I am getting problem in dialogue view when I am clicking on Cancel button, instead of closing the dialogue, its deleting the rows in the table and also showing following uncaught error.

Uncaught TypeError: d.getDay is not a function

I have recently try to convert a date format in one of the views. Not sure if this error is causing because of that. Date format code is as follows.

  oTableObjects.addColumn(new sap.ui.table.Column({

            label: new sap.ui.commons.Label({

                text: "Activated at"

            }),

//            template: oControl

        //Date modification   

             template: new sap.ui.commons.TextView().bindProperty("text", {                         

             path: 'ACTIVATED_AT',

             type: new sap.ui.model.type.Date({pattern:"yyyy-MM-dd HH:mm:ss.ms"})

            })

        }));

The code for cancel button is as follows:

var loButtonCancel = new sap.ui.commons.Button({

            tooltip: "Cancel",

            text: "Cancel",

            press: function() {

                createNote.destroy();

            }

Similarly code for Cancel button in other dialogues is

var loButtonCancel = new sap.ui.commons.Button({

        tooltip: "Cancel",

        text: "Cancel",

        press: function() {

            loThisDia.destroy();

        }

    });

Please help me correct this error. Any help would be much appreciated.

Thanks & Regards

Uday Kanike

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I am also getting this, any help appreciated.

Former Member
0 Kudos

this error occurs when you try to convert date format which is not supported.

there are many threads that explain date format conversion. But this conversion should only be done in views but not in controller code.