How to add character to prompt() while getting input from the user?

Is there a possible way to edit users input simultaneously?

What is my goal?
I am getting a date from the user with the following format → mm/dd/yyyy
I want my program to add “/” after user inputs the month and day automatically.

Link to my project → ⏳Count Down Timer⏳

You can’t, it’s a browser modal, you can’t control it. The user can enter anything they want in it, you can’t do anything about that except parse what they submit.

For form input, use forms: prompt is not really useful beyond very basic toy stuff (same as alert, though that has more usecases).

1 Like