0

I have a datepicker showing 'dd/mm/yy' in the Edit Form of a jqgrid and I want to send to the server the date in the 'yy/mm/dd' format. Im avoiding unformat in the server side. I wanna know if theres something like beforeSubmit function for the edit form. Tried to unformat it but aparently unformat isnt called when the form is submitted. Im using datainit to call the datepicker.

editoptions:{size:18, dataInit: function (elem) { 
    $(elem).datepicker({ dateFormat: 'dd/mm/yy', maxDate: +0 }) 
}

Any ideas?

Mah
  • 130
  • 2
  • 9

1 Answers1

1

If you use form editing you can modify the data which will be sent to the server inside of beforeSubmit or serializeEditData events (callbacks). See the answer, this one for additional information and examples.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798