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 104
104
105
105
const errorElement = document .getElementById (' date-error' );
106
106
for (let field of fields) {
107
- console .log (' id: ' , field .id )
108
107
const inputElement = document .getElementById (field .id );
109
- console .log (' el: ' , inputElement)
110
108
111
109
inputElement .addEventListener (' input' , function (event ) {
112
- console . log ( event )
110
+
113
111
if (event .inputType === ' deleteContentBackward' ) {
114
112
return ;
115
113
}
116
114
117
-
118
115
const value = event .data ;
119
116
const min = parseInt (inputElement .getAttribute (' min' ));
120
117
const max = parseInt (inputElement .getAttribute (' max' ));
125
122
126
123
setTimeout (function () {
127
124
if (value < 1 || value > max || ! value .match (/ ^ [0-9 ] * $ / )) {
128
- console .log (' not matched' )
129
125
inputElement .value = inputElement .value .slice (0 , - 1 ) + 1 ;
130
126
inputElement .value = inputElement .value .slice (0 , - 1 );
131
127
inputElement .setAttribute (' aria-invalid' , ' true' );
You can’t perform that action at this time.
0 commit comments