JQuery date selector plug-in date-input, jquerydate-input
Date-input of JQuery date selector plug-in
Http://jonathanleighton.com/projects/date-input/
:
Http://github.com/jonleighton/date_input/raw/master/jquery.date_input.js
Http://github.com/jonleighton/date_input/raw/master/date_input.css
Chinese support:
[Javascript]View plaincopy
- JQuery. extend (DateInput. DEFAULT_OPTS, {month_names: ["May January", "May February", "May March", "May April", "May", "May June", "May July", "May August ", "August September", "August October", "August November", "August December"], short_month_names: ["one", "two", "three", "four", "five ", "6", "7", "8", "9", "10", "11", "12"], short_day_names: ["1", "2 ", "3", "4", "5", "6", "day"]});
Note: The default date format is poor and can be modified as needed.
The Code is as follows:
[Html]View plaincopy
- <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <Html xmlns = "http://www.w3.org/1999/xhtml">
- <Head>
- <Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
- <Title> calendar </title>
- <Script type = "text/javascript" src = "jquery-1.3.2.js"> </script>
- <Script type = "text/javascript" src = "jquery. date_input.js"> </script>
- <Link rel = "stylesheet" href = "date_input.css" type = "text/css">
- <Script>
- JQuery. extend (DateInput. DEFAULT_OPTS ,{
- Month_names: ["May January", "May February", "May March", "May April", "May", "May June", "May July", "May August", "May September ", "August October", "August November", "August December"],
- Short_month_names: ["1", "2", "3", "4", "5", "6", "7", "8", "9 ", "10", "11", "12"],
- Short_day_names: ["1", "2", "3", "4", "5", "6", "day"],
- DateToString: function (date ){
- Var month = (date. getMonth () + 1). toString ();
- Var dom = date. getDate (). toString ();
- If (month. length = 1) month = "0" + month;
- If (dom. length = 1) dom = "0" + dom;
- Return date. getFullYear () + "-" + month + "-" + dom;
- }
- });
- $ (Function (){
- $ (". Biuuu1"). date_input ();
- $ (". Biuu2"). date_input ();
- });
- </Script>
- </Head>
- <Body>
- <Input type = "text" class = "biuuu1" name = "date"/>
- <Input type = "text" class = "biuuu2" name = "date"/>
- </Body>
- </Html>
Example: