Use JqueryUI to display the Chinese calendar and adjust the calendar size

Source: Internet
Author: User

First, introduce the Jquery library and css:

<Link href = "Js/jquery-ui-1.8.6.custom.css" rel = "stylesheet" type = "text/css"/>
<Script src = "Js/jquery-1.4.2.min.js" type = "text/javascript"> </script>
<Script src = "Js/jquery-ui-1.8.6.custom.min.js" type = "text/javascript"> </script>

Then you can set it as follows:

<Input ID = "nameTextBox" id = "datapicker" runat = "server"/>
<Script type = "text/javascript">
$ ("# Datapicker"). mouseover (function (){
$. Datepicker. regional ['zh-cn'] =
{

ClearText: 'clear', clearStatus: 'clear selected date ',
CloseText: 'close', closeStatus: 'Do not change current select ',
PrevText: '& lt; last month', prevStatus: 'Show previous month ',
NextText: 'Next month & gt; ', nextStatus: 'display next month ',
CurrentText: 'today', currentStatus: 'display month ',
MonthNames: ['August 11', 'August 11', 'August 11', 'August 11', 'August 11 ',
'October ', 'October'],
MonthNamesShort: ['1', '2', '3', '4', '5', '6 ',
'7', '8', '9', '10', '11', '12'],
MonthStatus: 'select month', yearStatus: 'select year ',
WeekHeader: 'Week', weekStatus: 'Weekly times within year ',
DayNames: ['sunday', 'monday', 'tuesday', 'weday', 'thursday', 'Friday'],
DayNamesShort: ['sunday', 'monday', 'tues', 'wedneth', 'thurs', 'Friday', 'satur'],
DayNamesMin: ['day', 'yi', '2', '3', '4', '5', '6'],
DayStatus: 'dd is set to the start of a week', dateStatus: 'select month/day, dd ',
DateFormat: 'yy-mm-dd', firstDay: 1,
InitStatus: 'select date', isRTL: false

};
$. Datepicker. setDefaults ($. datepicker. regional ['zh-cn']);
$ (This). datepicker ();
});
</Script>

Note: When the calendar starts to be displayed, It is very large. If you want to set the size, go to css to find it.

. Ui-datepicker {width: 17em; padding:. 2em. 2em 0 ;}
Change
. Ui-datepicker {width: 17em; padding:. 2em. 2em 0; font-size: specified size ;}

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.