jQuery datepicker Difference between “dateFormat” & “altFormat”

According to this documentation, http://jqueryui.com/demos/datepicker/#option-altFormat

I can set a different date format for the user to see, and a different format to actually send to the server.

However, both seem to show the same format.

Here is my code:

        $("#joindate").datepicker({
            dateFormat: $.datepicker.TIMESTAMP,
            altFormat: 'yy-mm-dd'
        });

And, I would want the user to see yy-mm-dd format, and send the timestamp to the server using my post request. I have switched the values of altFormat and dateFormat, but either I get yy-mm-dd in both (textbox and $_POST) or the timestamp in both.

Is there a workaround to this ?

7
задан Hrishikesh Choudhari 11 April 2011 в 09:59
поделиться