File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
NHSUKViewComponents.Web/Views/Shared/Components/DateInput Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change 104104
105105 const errorElement = document .getElementById (' date-error' );
106106 for (let field of fields) {
107- console .log (' id: ' , field .id )
108107 const inputElement = document .getElementById (field .id );
109- console .log (' el: ' , inputElement)
110108
111109 inputElement .addEventListener (' input' , function (event ) {
112- console . log ( event )
110+
113111 if (event .inputType === ' deleteContentBackward' ) {
114112 return ;
115113 }
116114
117-
118115 const value = event .data ;
119116 const min = parseInt (inputElement .getAttribute (' min' ));
120117 const max = parseInt (inputElement .getAttribute (' max' ));
125122
126123 setTimeout (function () {
127124 if (value < 1 || value > max || ! value .match (/ ^ [0-9 ] * $ / )) {
128- console .log (' not matched' )
129125 inputElement .value = inputElement .value .slice (0 , - 1 ) + 1 ;
130126 inputElement .value = inputElement .value .slice (0 , - 1 );
131127 inputElement .setAttribute (' aria-invalid' , ' true' );
You can’t perform that action at this time.
0 commit comments