Horje
Only numbers or string. Input field in React Code Example
Only numbers or string. Input field in React
onKeyPress={(e) => !/[0-9]/.test(e.key) && e.preventDefault()} // numbers only

onKeyPress={(e) => !/[a-zA-z]/.test(e.key) && e.preventDefault()} // alphabets only.




Javascript

Related
How to check if JSON is changed in Javascript? Code Example How to check if JSON is changed in Javascript? Code Example
lodash isequal Code Example lodash isequal Code Example
javascript write to text file stack overflow Code Example javascript write to text file stack overflow Code Example
material ui react card Code Example material ui react card Code Example
create an all day event by drag and drop Code Example create an all day event by drag and drop Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7