Javascript special calendar control sharing, javascript calendar Control
This article shares a cool js calendar Control for your reference. The details are as follows:
Reference JSLit. js to download JSLite. io, compatible with JSLite and jQuery
Installation Method
Page reference JSLite or jQuery
<Div id = "JSLiteCalenbar4"> <input type = "text"> </div> <script type = "text/javascript" src = ".. /JSLite. js "> </script> <script type =" text/javascript "src =" JSLite. calendar. js "> </script> <script type =" text/javascript "> var obj4 = document. getElementById ("JSLiteCalenbar4") var cal = new $. calendar ($ ("# JSLiteCalenbar4") [0], function (date) {console. log (date); // return the Modified Time Value date = 2014-10-11 $ ('# JSLiteCalenbar4 input '). val () this. calBoxs. prev (). val (date )}). hide (). time ("yyyy/MM dd Day hh: mm: ss", 'default') console. log (cal); </script>
Extension Method
- HidePrevBtn: Hide the previous page button to show future time. You cannot view history.
- Hide: Click the display page.
- SetDate: set the time and pass the json
- Time: Set whether to select the time (time) "yyyy/MM dd Day hh: mm: ss" serial number time format 'default'. The default time or specified time is displayed in input by default.
Hide
Click Show
<Div id = "JSLiteCalenbar2"> <div class = ""> click to display </div> <script type = "text/javascript"> var obj3 = document. getElementById ("JSLiteCalenbar2") new $. calendar (obj3, {"now": ""}, function (date) {// return the Modified Time Value date = console. log (date )}). hide (); </script>
Example 1
Var obj3 = document. getElementById ("JSLiteCalenbar2") new JSLite. calendar (obj3, {"now": ""}, function (date) {// return the Modified Time Value date = console. log (date) console. log ("obj3 ")}). time ("yyyy/MM dd Day hh: mm: ss", 'default'); var cal = new JSLite. calendar (obj, function () {return {"now": "", // current server time "change": true, // whether to change the content before the current time "interfaceNum": 3, // display the number of calendars after the current time "workdate": [{"date": "2013-12 ", "day": ["1", "2", "3", "4", "5", "6", "7", "8 ", "9", "10", "20"] },{ "date": "2014-09", "day": ["10", "2 ", "3", "4", "5", "6", "20"] },{ "date": "2014-05", "day ": ["10", "2", "3", "4", "5", "6", "20"] },{ "date ": "2014-10", "day": ["12", "2", "3", "4", "5", "6 ", "20"]}] }}, function (date) {// return the Modified Time Value date = ["2014-10 ", "2014-10-11,0"] console. log (date )}). hidePrevBtn ()
Example 2
Var obj3 = document. getElementById ("JSLiteCalenbar2") new JSLite. calendar (obj3, function (date) {// return the Modified Time Value date = console. log (date) console. log ("obj3 ")}). hidePrevBtn (). hide ()
The above is all the content of this article, hoping to help you learn.
Articles you may be interested in:
- New JavaScript blog-style calendar Control Algorithm
- Js calendar control (accurate to minutes)
- Supports javascript calendar controls for IE and Firefox
- Php + javascript calendar controls
- JS calendar control (blue)
- One simple calendar Control for JS Learning
- Javascript to implement the calendar control (year, month, and day close button)
- Modify js Calendar controls to be compatible with IE9/Google/Firefox
- Simple JS calendar control instance code
- Create calendar controls with pure javascript