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 5757 color : # b5b5b5 ;
5858 padding : 5px ;
5959}
60+ .calRowHead .calCellDay : hover {
61+ color : # ff5b5b ;
62+ cursor : pointer;
63+ }
6064.calRowBack .calCell { border : 1px solid # eee ; }
6165.calBlank { background : # f5f5f5 ; }
6266.calToday { background : # feffd3 ; }
Original file line number Diff line number Diff line change @@ -112,7 +112,17 @@ var cal = {
112112 celler = day => {
113113 cell = document . createElement ( "div" ) ;
114114 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+ }
116126 rowB . appendChild ( cell ) ;
117127 cell = document . createElement ( "div" ) ;
118128 cell . className = "calCell" ;
Original file line number Diff line number Diff line change 6565 </div>
6666
6767 <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>
6969 <label>Event</label>
7070 </div>
7171
You can’t perform that action at this time.
0 commit comments