+ 2
Input focus js
Why this input doesn't show the date when i click show alert button, even though i use .focus() Function to get focus from that input. https://code.sololearn.com/WXYobQ0F08DJ/?ref=app
7 Respostas
+ 2
The input does get focus, but you need to click the arrow option to get the date selection screen. In case you think your focus function isn't working, it is working fine and below is the proof it works
https://code.sololearn.com/W6sYPL5r949d/?ref=app
+ 2
Ipang thank you it's working
+ 1
How do i can get date show when i clicked show alert button?
+ 1
You can trigger the date input by calling the default click event handler after setting the focus on it
inputDate.focus();
inputDate.click();
+ 1
Is there any JavaScript function to do that?
+ 1
Just add
inputDate.click();
After
inputDate.focus()
It works in my phone, haven't tested it in browser ...
0
Password show problem