lundi 17 août 2015

Changing format of the date in SAPUI5 in DatePicker

I'm trying to get value of DatePicker like so:

var start_date = sap.ui.getCore().byId("start_date_add").getValue();

but I get date in format Jul 29, 2015, I would like to parse it so it is like so: 2015-08-29. Constructor for my date picker:

            new sap.ui.commons.DatePicker({
                id: "start_date_add",
                value: {
                    type: new sap.ui.model.type.Date({
                        pattern: "yyyy-MM-dd",
                        strictParsing: true
                    })
                }
            }),

any help is appreciated

Aucun commentaire:

Enregistrer un commentaire