22< html lang ="en " dir ="ltr ">
33 < head >
44 < meta charset ="UTF-8 " />
5- < title > Datetime - Custom </ title >
5+ < title > Datetime - Show Adjacent Days </ title >
66 < meta name ="viewport " content ="width=device-width, initial-scale=1.0, minimum-scale=1.0 " />
77 < link href ="../../../../../css/ionic.bundle.css " rel ="stylesheet " />
88 < link href ="../../../../../scripts/testing/styles.css " rel ="stylesheet " />
3333 }
3434 }
3535
36- /*
37- * Custom Datetime Time / Wheel Parts
38- * -------------------------------------------
39- */
40-
41- .custom-grid-wheel {
42- --background : rgb (245 , 235 , 247 );
43- --background-rgb : 245 , 235 , 247 ;
44- }
45-
46- .custom-grid-wheel ::part (time-button ) {
47- color : rgb (128 , 30 , 171 );
48- }
49-
50- .custom-grid-wheel ::part (time-button active ) {
51- background-color : rgb (248 , 215 , 255 );
52- }
53-
54- .custom-grid-wheel {
55- --wheel-highlight-background : rgb (218 , 216 , 255 );
56- --wheel-highlight-border-radius : 16px ;
57- --wheel-fade-background-rgb : 245 , 235 , 247 ;
58- }
59-
60- ion-picker {
61- --highlight-background : rgb (218 , 216 , 255 );
62- --highlight-border-radius : 16px ;
63- --fade-background-rgb : 245 , 235 , 247 ;
64-
65- background-color : rgb (245 , 235 , 247 );
66- }
67- .custom-grid-wheel ::part (wheel-item ),
68- ion-picker-column-option {
69- color : rgb (255 , 134 , 154 );
70- }
71-
72- .custom-grid-wheel ::part (wheel-item active ),
73- ion-picker-column-option .option-active {
74- color : rgb (128 , 30 , 171 );
75- }
76-
7736 /*
7837 * Custom Datetime Day Parts
7938 * -------------------------------------------
142101 < ion-app >
143102 < ion-header translucent ="true ">
144103 < ion-toolbar >
145- < ion-title > Datetime - ShowDaysOutsideCustomMonth </ ion-title >
104+ < ion-title > Datetime - Show Adjacent Days </ ion-title >
146105 </ ion-toolbar >
147106 </ ion-header >
148107 < ion-content class ="ion-padding ">
149108 < div class ="grid ">
150109 < div class ="grid-item ">
151- < h2 > Grid Style </ h2 >
152- < ion-datetime id =" custom-grid " value ="2020-03-14T14:23:00.000Z " class =" custom-grid-wheel "> </ ion-datetime >
110+ < h2 > Inline Grid </ h2 >
111+ < ion-datetime show-adjacent-days =" true " value ="2020-03-14T14:23:00.000Z "> </ ion-datetime >
153112 </ div >
154113
155114 < div class ="grid-item ">
156- < h2 > Grid Style</ h2 >
157- < ion-datetime id ="custom-calendar-days " value ="2023-06-15 " presentation ="date "> </ ion-datetime >
115+ < h2 > Inline Grid: Custom Styles</ h2 >
116+ < ion-datetime
117+ show-adjacent-days ="true "
118+ id ="custom-calendar-days "
119+ value ="2023-06-15 "
120+ presentation ="date "
121+ > </ ion-datetime >
158122 </ div >
159123 </ div >
160124
161125 < div class ="grid ">
162126 < div class ="grid-item ">
163127 < h2 > Disable Specific Date</ h2 >
164- < ion-datetime id ="specificDate " value ="2021-10-01 " showAdjacentDays ="true "> </ ion-datetime >
128+ < ion-datetime
129+ show-adjacent-days ="true "
130+ id ="specificDate "
131+ value ="2021-10-01 "
132+ showAdjacentDays ="true "
133+ > </ ion-datetime >
165134 </ div >
166135
167136 < div class ="grid-item ">
168137 < h2 > Disable Weekends</ h2 >
169- < ion-datetime id ="weekends " value ="2021-10-01 "> </ ion-datetime >
138+ < ion-datetime show-adjacent-days =" true " id ="weekends " value ="2021-10-01 "> </ ion-datetime >
170139 </ div >
171140
172141 < div class ="grid-item ">
173142 < h2 > Disable Date Range</ h2 >
174- < ion-datetime id ="dateRange " value ="2021-10-01 "> </ ion-datetime >
143+ < ion-datetime show-adjacent-days =" true " id ="dateRange " value ="2021-10-01 "> </ ion-datetime >
175144 </ div >
176145
177146 < div class ="grid-item ">
178147 < h2 > Disable Month</ h2 >
179- < ion-datetime id ="month " value ="2021-10-01 "> </ ion-datetime >
148+ < ion-datetime show-adjacent-days =" true " id ="month " value ="2021-10-01 "> </ ion-datetime >
180149 </ div >
181150
182151 < div class ="grid-item ">
183152 < h2 > Change firstDayOfWeek</ h2 >
184- < ion-datetime id ="firstDayOfWeek " first-day-of-week ="1 " value ="2022-05-03 "> </ ion-datetime >
153+ < ion-datetime
154+ show-adjacent-days ="true "
155+ id ="firstDayOfWeek "
156+ first-day-of-week ="1 "
157+ value ="2022-05-03 "
158+ > </ ion-datetime >
185159 < button onclick ="increase() "> Increase firstDayOfWeek</ button >
186160 < div >
187161 < span > FirstDayOfWeek: < span id ="start-of-week "> 1</ span > </ span >
@@ -202,7 +176,7 @@ <h2>Change firstDayOfWeek</h2>
202176 < option value ="cover "> cover</ option >
203177 </ select >
204178 < br /> < br />
205- < ion-datetime id ="display " value ="2022-02-22T16:30:00 "> </ ion-datetime >
179+ < ion-datetime show-adjacent-days =" true " id ="display " value ="2022-02-22T16:30:00 "> </ ion-datetime >
206180 </ div >
207181 </ ion-content >
208182 </ ion-app >
@@ -248,8 +222,6 @@ <h2>Change firstDayOfWeek</h2>
248222
249223 return true ;
250224 } ;
251- customGrid . showAdjacentDays = true ;
252- customDatetime . showAdjacentDays = true ;
253225
254226 const specificDateDisabled = document . querySelector ( '#specificDate' ) ;
255227 specificDateDisabled . isDateEnabled = ( dateIsoString ) => {
@@ -260,7 +232,6 @@ <h2>Change firstDayOfWeek</h2>
260232 }
261233 return true ;
262234 } ;
263- specificDateDisabled . showAdjacentDays = true ;
264235
265236 const weekendsDisabled = document . querySelector ( '#weekends' ) ;
266237 weekendsDisabled . isDateEnabled = ( dateIsoString ) => {
@@ -271,7 +242,6 @@ <h2>Change firstDayOfWeek</h2>
271242 }
272243 return true ;
273244 } ;
274- weekendsDisabled . showAdjacentDays = true ;
275245
276246 const dateRangeDisabled = document . querySelector ( '#dateRange' ) ;
277247 dateRangeDisabled . isDateEnabled = ( dateIsoString ) => {
@@ -284,7 +254,6 @@ <h2>Change firstDayOfWeek</h2>
284254 }
285255 return true ;
286256 } ;
287- dateRangeDisabled . showAdjacentDays = true ;
288257
289258 const monthDisabled = document . querySelector ( '#month' ) ;
290259 monthDisabled . isDateEnabled = ( dateIsoString ) => {
@@ -295,10 +264,8 @@ <h2>Change firstDayOfWeek</h2>
295264 }
296265 return true ;
297266 } ;
298- monthDisabled . showAdjacentDays = true ;
299267
300268 const firstDayOfWeek = document . querySelector ( '#firstDayOfWeek' ) ;
301- firstDayOfWeek . showAdjacentDays = true ;
302269 function increase ( ) {
303270 firstDayOfWeek . firstDayOfWeek = firstDayOfWeek . firstDayOfWeek + 1 ;
304271
@@ -307,7 +274,6 @@ <h2>Change firstDayOfWeek</h2>
307274 }
308275
309276 const display = document . querySelector ( '#display' ) ;
310- display . showAdjacentDays = true ;
311277
312278 const mutationObserver = new MutationObserver ( ( ) => {
313279 window . dispatchEvent ( new CustomEvent ( 'ionWorkingPartsDidChange' ) ) ;
0 commit comments