Datepicker doesn't exit on mobile when selecting date and time.
See original GitHub issueExpected behavior
When I select a date and then a time, the Datepicker should close
Actual behavior
When I select a date and then a time, the Datepicker stays open
Steps to reproduce
<DatePicker
selected={props.startDate}
onChange={props.changeStartDate}
showTimeSelect
timeIntervals={30}
dateFormat="MM/DD/YY, hh:mm a"
todayButton="Today"
minDate={moment()}
readOnly
/>
I have the latest version. I’m not sure why this is happening.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
jQuery Datepicker close datepicker after selected date
I use bootstrap datepicker. When I click to datepicker it opens and I select any date. My question: If I choose date from...
Read more >DatePicker empty value - Power Platform Community - Microsoft
Solved: Have been playing some more with the DatePicker in an EditForm, but can't seem to work out how to ensure a blank...
Read more >Datepicker documentation for JQuery | Mobiscroll
Name Type Default value
anchor HTMLElement undefined
animation String, Boolean undefined
buttons Array
Read more >3 steps to implementing a better date picker in Power Apps
The first step is to create a component in your app. Then within your app create a calendar screen using the screen template...
Read more >Date Picker Dialog Example | APG | WAI - W3C
Choosing a date from the calendar closes the dialog and populates the date input field. When the dialog is opened, if the input...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I find that adding ‘preventOpenOnFocus’ to props will solve this problem
<DatePicker selected={props.startDate} onChange={props.changeStartDate} showTimeSelect timeIntervals={30} dateFormat="MM/DD/YY, hh:mm a" todayButton="Today" minDate={moment()} readOnly preventOpenOnFocus />
I have resolved this issue and already created PR #1400
Use of preventOpenOnFocus is not used that much if my requirement is related to the focus event like in the form after every field user generally used the tab to move next.