@@ -199,25 +199,27 @@ export default class DateInput extends InputBase<IDateInput> {
199199 autocapitalize=${ this . model . autocapitalize }
200200 autocomplete="${ this . model . autocomplete } "
201201 ?required=${ this . model . required }
202- ?disalbed =${ this . model . disabled }
202+ ?disabled =${ this . model . disabled }
203203 ?autofocus=${ this . model . autofocus }
204204 />
205205 </ input-container >
206206 ` ;
207207 render ( view , this ) ;
208208
209- const input = this . querySelector ( "input" ) ;
210- flatpickr ( input , {
211- dateFormat : this . model . dateFormat ,
212- enableTime : this . model . enableTime ,
213- altFormat : this . model . displayFormat ,
214- altInput : true ,
215- minDate : this . model . minDate ,
216- maxDate : this . model . maxDate ,
217- mode : this . model . mode ,
218- noCalendar : this . model . disableCalendar ,
219- time_24hr : this . model . timeFormat === "24" ,
220- } ) ;
209+ if ( this . state !== "DISABLED" ) {
210+ const input = this . querySelector ( "input" ) ;
211+ flatpickr ( input , {
212+ dateFormat : this . model . dateFormat ,
213+ enableTime : this . model . enableTime ,
214+ altFormat : this . model . displayFormat ,
215+ altInput : true ,
216+ minDate : this . model . minDate ,
217+ maxDate : this . model . maxDate ,
218+ mode : this . model . mode ,
219+ noCalendar : this . model . disableCalendar ,
220+ time_24hr : this . model . timeFormat === "24" ,
221+ } ) ;
222+ }
221223 this . firstRender = false ;
222224 }
223225}
0 commit comments