The jQuery UI DatePicker offers plenty of functionality to the developer, and even though well-documented, at times you could miss out on some useful built-in functions. One such functionality is the built-in date formats, available as constants.
We all know how to change the date format for the DatePicker. To change the dateformat to something like “14 Sep 2011” , is as simple as this:
However the API defines some built-in date formats as given in this table below, which is very useful if you are following common standards or RFC formats
Here’s how to use one of these formats in your code. We will use the TIMESTAMP format to select the UNIX timestamp.
Now when the user selects a date from the datepicker, the timestamp is displayed in the input