views:

24

answers:

2

When I am sending my date using .serialize() it is sending as an string not exact date format ...is there a way I can send it as 09/01/2010... not as a string

+2  A: 

Everything is posted to the server as a string...this is just how HTTP POST works. You can change the format, but it'll be a string no matter what date format you use.

If you're using the jQuery UI Datepicker you can populate another field used for posting use the altField and altFormat options, for example:

$("#datepicker").datepicker({
  altField: '#FieldToPost',
  altFormat: 'yyyy-mm-dd' //whatever format here
});

For format information, check our your options here.

Nick Craver
thanks! @Nick ...I make all changes in server side and its working well...
paul
A: 

Datepicker just writes values to a input box, which is a string. In the page this form is being posted to, you can convert the string to a date.

Rocket