Js multiple-choice date control and js multiple-choice control
Js multi-Choice Date Control
See http://www.lovewebgames.com/jsmodule/calendar.html for details
Its github address: https://github.com/tianxiangbing/calendar
Calendar
Js calendar Control
Usage
1 <input type = "text" id = "calendar" value = "2015-04-15"/> 2 <script src = ".. /src/jquery-1.9.1.min.js "> </script> 3 <script src = ".. /src/calendar. js "> </script> 4 <script> 5 var calendar = new Calendar (); 6 calendar. init ({7 target: $ ('# calendar'), 8 range: ['2014-3-5 ', '2014-3-25'], 9 multiple: true, 10 maxdays: 5, 11 overdays: function (a) {12 alert ('added to the upper limit '+ a + 'day'); 13} 14}); 15 </script>
Or
<input type="text" class="calendar" value="2015-03-14"/> <input type="text" class="calendar2" value="2015-03-18"/> <script src="../dist/jquery-1.9.1.min.js"></script> <script src="../dist/calendar-jquery.min.js"></script> <script> $(".calendar").Calendar({toolbar:true}); $(".calendar2").Calendar(); </script>
Property and method property date:
Current date.
Toolbar: bool
Show the operation column below
Separator:
Date separator. Default Value "-".
Id:
Calendar container ID
CalendarContainer:
Calendar container object
DayArr:
['Day', 'yi', '2', '3', '4', '5', '6']
MonthArr:
", "August October", "August November", "August December"]
IsShow: whether to display maxdays: the maximum number of days when multiple options are selected. setRange: function (range)
Method for setting the optional date range
Init: function (settings) settings parameter focusDate:
Selected Date }}
Target:
The event node that triggers the calendar. It can be input or other labels. If it is input, the value is used as the focusDate by default. Otherwise, the value of the previous input of the target or the current time is used.
Selected: function (a, B)
The selected callback event. The parameter is a time object and a calendar container.
BeforeSelect: function (a, B)
Select the trigger method, the parameter is (a) time object, (B) calendar container
Overdays: function (daysnum)
Callback when the specified number of days is exceeded (select multiple times)