File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 57
57
color : # b5b5b5 ;
58
58
padding : 5px ;
59
59
}
60
+ .calRowHead .calCellDay : hover {
61
+ color : # ff5b5b ;
62
+ cursor : pointer;
63
+ }
60
64
.calRowBack .calCell { border : 1px solid # eee ; }
61
65
.calBlank { background : # f5f5f5 ; }
62
66
.calToday { background : # feffd3 ; }
Original file line number Diff line number Diff line change @@ -112,7 +112,17 @@ var cal = {
112
112
celler = day => {
113
113
cell = document . createElement ( "div" ) ;
114
114
cell . className = "calCell" ;
115
- if ( day ) { cell . innerHTML = day ; }
115
+ if ( day ) {
116
+ cell . innerHTML = day ;
117
+ cell . classList . add ( "calCellDay" ) ;
118
+ cell . onclick = ( ) => {
119
+ cal . show ( ) ;
120
+ let d = + day , m = + cal . hMth . value ,
121
+ s = `${ cal . hYear . value } -${ String ( m < 10 ? "0" + m : m ) } -${ String ( d < 10 ? "0" + d : d ) } T00:00:00` ;
122
+ cal . hfStart . value = s ;
123
+ cal . hfEnd . value = s ;
124
+ } ;
125
+ }
116
126
rowB . appendChild ( cell ) ;
117
127
cell = document . createElement ( "div" ) ;
118
128
cell . className = "calCell" ;
Original file line number Diff line number Diff line change 65
65
</div>
66
66
67
67
<div class="w-100 p-1 form-floating">
68
- <input id="evtTxt" class="form-control" type="text" required>
68
+ <input id="evtTxt" class="form-control" type="text" autocomplete="off" required>
69
69
<label>Event</label>
70
70
</div>
71
71
You can’t perform that action at this time.
0 commit comments