Select Date Time In Next 7 Days jQuery Calendar7 - Download Select Date And Time In Next 7 Days - jQuery Calendar7 Plugin

Download Select Date And Time In Next 7 Days – jQuery Calendar7 Plugin

Posted on

This time I will share jQuery Plugin and tutorial about Select Date And Time In Next 7 Days – jQuery Calendar7 Plugin, hope it will help you in programming stack.

Select Date Time In Next 7 Days jQuery Calendar7 - Download Select Date And Time In Next 7 Days - jQuery Calendar7 Plugin

File Size: 5.53 KB
Views Total: 4133
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Calendar7 is a small jQuery datatime picker plugin used to select date & time from a calendar which shows only last 7 days from today’s date.

How to use it:

1. Load the main stylesheet style.css to style the datetime picker.

1 <link rel="stylesheet" href="style.css">

2. Create a normal input field the datetime picker should attach to.

1 <input class="calendar7">

3. Place both jQuery JavaScript library and the calendar7.js script at the bottom of the web page.

1 <script src="//code.jquery.com/jquery.min.js"></script>
2 <script src="calendar7.js"></script>

4. Call the function on the input field and done.

1 jQuery('.calendar7').Calendar7()

5. Set the start/end times.

1 jQuery('.calendar7').Calendar7({
2   allowTimeStart: '1:00',
3   allowTimeEnd: '20:00'
4 })

6. Override & modify the CSS rules to create your own styles.

01 .calendar-7 {
02   position: absolute;
03   width: 376px;
04   background-color: #72b8ff;
05   padding: 8px
06 }
07  
08 .calendar-7 .days {
09   color: white;
10   font: 14px normal;
11   width: 100%;
12   text-align: center
13 }
14  
15 .calendar-7 .days .calendar-7-day {
16   display: inline-block;
17   cursor: pointer;
18   width: 13%;
19   height: 55px;
20   padding-top: 8px;
21   margin-bottom: 8px
22 }
23  
24 .calendar-7 .days .calendar-7-day:hover, .calendar-7 .days .calendar-7-day.active { background-color: #2874c6 }
25  
26 .calendar-7 .hours, .calendar-7 .minutes {
27   background-color: white;
28   width: 360px;
29   height: 162px;
30   margin: 0 auto;
31   border-radius: 4px
32 }
33  
34 .calendar-7 .minutes {
35   display: none;
36   height: 81px
37 }
38  
39 .calendar-7 .calendar-7-hour, .calendar-7 .calendar-7-minute {
40   float: left;
41   display: inline-block;
42   box-sizing: border-box;
43   width: 25%;
44   font: 14px normal;
45   padding: 4px;
46   color: #4a4a4a;
47   text-align: center;
48   cursor: pointer
49 }
50  
51 .calendar-7 .calendar-7-hour:hover, .calendar-7 .calendar-7-minute:hover, .calendar-7 .calendar-7-hour.active, .calendar-7 .active.calendar-7-minute {
52   background-color: #53a2f6;
53   color: white;
54   border-radius: 3px
55 }
56  
57 .calendar-7 .calendar-7-hour.disabled, .calendar-7 .disabled.calendar-7-minute {
58   color: #333;
59   background-color: #eee;
60   cursor: not-allowed
61 }

This awesome jQuery plugin is developed by zengxiaoluan. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net