jquery - jqGrid How to unformat date fields and post in format yyyy-mm-dd for mysql DB? -


butti have big problem havent been able figure out. have 3 date columns can bbe edited when edit row , don't update of date fields posts in new format set 'm-d-y' instead of source format server "yyyy-mm-dd. " how can un-format these 3 fields before sending database if not edited @ all? plesae note "asign date" has been changed datepicker other fields post if not edited.i not want change end php format on fronend. please suggestions appreciated.

enter image description here

using serializeeditdata callback can modify data send server. callback input parameter object properties parameters send server. can modify property change it. callback can return either modified object of string.

the simplest example of serializeeditdata be

serializeeditdata: function (postdata) {     var partsofdate = postdata.checkdate.split("/");     if (partsofdate.length === 3) {         postdata.checkdate = partsofdate[2] + "-" + partsofdate[0] + "-" +             partsofdate[1];     }     return postdata; } 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -