Set the date format for DatePicker

Source: Internet
Author: User
Tags month name


DatePicker is a date control provided by jQueryUI, providing only date selection, no time, but basically enough.


The default date format is: Mm/dd/yy

The format character represents the following meanings:

D-Day of the month (no leading 0) DD-the day ordinal of a month (two digits) O-the Day of the year (no leading 0) Oo-the Day of the year (three digits) D-Day name short dd-day name Long M-month (without leading 0) mm-month (two digits) m-month name Short mm-month name Long y-year (two digits) YY-year (four digits) @-Unix timestamp (from 01/01/1970 onwards) ' ... '-text '-single quote (others)-text

We can specify the format, such as:

$ ('. Date '). DatePicker ({dateformat: "Yy-mm-dd"});

More information can be found on the official website:

Http://docs.jquery.com/UI/Datepicker

Official Example:

Http://jqueryui.com/demos/datepicker

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.