JQuery Tools Dateinput

Source: Internet
Author: User

Help document: Portal
Html
Copy codeThe Code is as follows:
<! DOCTYPE html>
<Html>
<Head>
<Title> jQuery Tools dateinput demo </title>
<! -- Include the Tools -->
<Script src = "http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"> </script>
<Script src = "./jquery. tools. date-zh-CN.js"> </script>
<Link rel = "stylesheet" type = "text/css"
Href = "http://jquerytools.org/media/css/dateinput/large.css"/>
<! -- Some overrides -->
<Style>
. Date {width: 357px ;}
# Calhead {padding-left: 95px ;}
# Caltitle {background-color: # fff ;}
# Calnext {float: left ;}
</Style>
</Head>
<Body> <! -- 0 value will display the current date formatted with the default
Formatter -->
<Div style = "width: 360px; margin: 0 auto;">
<Input type = "date" name = "test" value = "0"/>
</Div>
<Script>
$ (Function (){
$ (": Date"). dateinput ({
Lang: 'zh-cn ',
Format: 'dddd dd, mmmm yyyy ',
Offset: [30, 0]
});
})
</Script>
</Body>
</Html>

CSS
I use them directly
Http://jquerytools.org/media/css/dateinput/large.css
Localization:
Query. tools. date-zh-CN.js
Copy codeThe Code is as follows:
JQuery (function (){
$. Tools. dateinput. localize ("zh-CN ",{
Months: 'August 1, August 1, August 1, August 1, '+
'August 1 ',
Months: 'One, two, three, four, none, six, seven, '+
'Eight, nine, ten, eleven, 12 ',
Days: 'Sunday, Monday, Tuesday, Thursday, Friday ',
Expiration days: 'Day, one, two, three, four, five, six'
});
});

The name is case insensitive, so zh-CN requires lang: 'zh-cn'
This is the end of this article. If other controls are developed using mvc, mvc provides built-in prompts and errors. The jQuery-Tools series translate some jQuery Tools that are frequently used.

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.