Kamal Kamal - 2 years ago 182
PHP Question

convert date kendo ui grid

I have Kendo UI grid when I save a new date value, the value send as POST request like

Wed Jun 19 2013 17:48:32 GMT+0200 (Egypt Standard Time)

I am trying to take this value and send to the web service which waiting value with type "DateTime"

I want to convert the sending value date even in Kendo UI before send as POST value or

in the PHP file when I receive this value

Any Help ?

Answer Source

kendo ui allow set culture and date format adding

please checkout http://docs.kendoui.com/api/framework/kendo#culture


Reading i found this:


    parameterMap: function (options, operation) {
                            if (operation != "read") {
                                var d = new Date(options.Date);
                                options.Date = d.toString("yyyy-MM-dd");                            
                                return options;
{ field: "Date", title: "Date ", type: "date", format: "{0:dd/MM/yyyy}" }

result : 30/08/2012
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download