jquery UI DatePicker Time Control usage (base version) _jquery

Source: Internet
Author: User
Tags jquery ui datepicker

This article for you to share the jquery UI DatePicker Time control usage, through an example to understand the UI DatePicker time control, let us have a look at the effect chart:

Effect:

Common occasions:
1. Input box
2.div
How to use:
1. Date of restriction

$ ("#resultDiv"). DatePicker ({
 onselect:function (datetext, inst) {
 //code: event triggered after selecting a date
 },
 mindate:new Date (),//Minimum date
 maxdate:new date ($ ("#DateLimit"). Val ())//MAX date
 });

2. Chinese

JQuery (function ($) {
 $.datepicker.regional[' zh-cn '] = {
 closetext: ' Close ',
 prevtext: ' < last month ',
 Nexttext: ' Next month > ',
 currenttext: ' Today ',
 monthnames: [' January ', ' February ', ' March ', ' April ', ' May ', ' June ',
 ' July ', ' August ', ' September ', ' ', ' November ', ' December '],
 monthnamesshort: [' One ', ' two ', ' three ', ' four ', ' five ', ' Six ',
 ' seven ', ' eight ', ' nine ', ' ten ', ' 11 ', ' 12 '],
 daynames: [' Sunday ', ' Monday ', ' Tuesday ', ' Wednesday ', ' Thursday ', ' Friday ', ' Saturday '],
 daynamesshort: [' Sunday ', ' Monday ', ' Tuesday ', ' Wednesday ', ' Thursday ', ' Friday ', ' in ', ' Saturday '],
 da Ynamesmin: [' Day ', ' one ', ' two ', ' three ', ' four ', ' five ', ' six '],
 weekheader: ' Zhou ',
 dateformat: ' Yy-mm-dd ',
 FIRSTDAY:1,
   isrtl:false,
 showmonthafteryear:true,
 yearsuffix: ' Year '
 };
 $.datepicker.setdefaults ($.datepicker.regional[' zh-cn ');
 });

The above is the jquery UI DatePicker Time Control use method, the content is very simple, the goal is lets the parents understand the UI DatePicker time control, hoped everybody will like, regarding the jquery UI DatePicker time control does not end, The next article will continue to learn more.

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.