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.