File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 9090 < label hidden$ ="[[!label]] " slot ="label "> [[label]]</ label >
9191
9292 < iron-input bind-value ="{{value}} " slot ="input "
93+ id ="input "
9394 maxlength$ ="[[maxlength]] "
9495 allowed-pattern ="[0-9\/] "
9596 invalid ="{{invalid}} ">
96- < input id =" input "
97+ < input
9798 aria-labelledby$ ="[[_ariaLabelledBy]] "
9899 aria-describedby$ ="[[_ariaDescribedBy]] "
99100 disabled$ ="[[disabled]] "
179180 if ( typeof oldValue === 'undefined' || value === oldValue )
180181 return ;
181182 value = value ? value . toString ( ) : '' ;
182- let start = this . $ . input . selectionStart ;
183+ let start = this . $ . input . inputElement . selectionStart ;
183184 let initialSlashesBeforeCaret = value . substr ( 0 , start ) . split ( '/' ) . length - 1 ;
184185 value = value . replace ( / \/ / g, '' ) ;
185186 let shouldFormat = value . length <= this . datePattern . replace ( / \/ / g, '' ) . length ;
198199 let updatedSlashesBeforeCaret = formattedValue . substr ( 0 , start ) . split ( '/' ) . length - 1 ;
199200 let slashesDifference = updatedSlashesBeforeCaret - initialSlashesBeforeCaret ;
200201 this . updateValueAndPreserveCaret ( formattedValue . trim ( ) ) ;
201- this . $ . input . selectionStart = this . $ . input . selectionEnd = start + slashesDifference ;
202+ this . $ . input . inputElement . selectionStart = this . $ . input . inputElement . selectionEnd = start + slashesDifference ;
202203 this . _handleAutoValidate ( ) ;
203204 } ,
204205
You can’t perform that action at this time.
0 commit comments