Open only on Calendar Icon
See original GitHub issue@eternicode This may be a duplicate ticket of #456, but I’m not sure if it’s a new issue since that was from a year or two back). I’m having an issue, and am not sure if #377 solved it or if the fix is still in the works… I’m using the “showOnFocus” method (set to False- have tried in both JS and HTML), but rather than only focusing when clicking the calendar icon, it eliminates focus on everything. Am I using the method incorrectly? Code sample below.
HTML:
<div class="input-group date">
<input id="date" type="text" maxlength="14" class="form-control our-date-picker" data-provide="our-date-picker" data-date-autoclose="true" data-date-toggle-active="true" data-date-show-on-focus="false"/>
<span class="input-group-addon">
<i class="fa fa-calendar"></i>
</span>
</div>
Javascript:
$('#sandbox-container input').datepicker({
orientation: "top right",
showOnFocus: "false"
});
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How to show calendar only click on icon using JavaScript
Whether the calendar opening in a form of a drop-down on clicking the icon only or focussing on the input field entirely, it...
Read more >How to show calendar only on icon click? - Stack Overflow
Run snippet below it only works on the icon click. function setDatepicker(_this) { //Get the parent class name so we can show date...
Read more >Open calendar only on icon click and not on focus of input #86
Is it possible to customize so that on focus of input user can only type the date values and on clicking of calendar...
Read more >Show or hide a calendar on Mac - Apple Support
Show or hide a calendar's events: Select or deselect the calendar's checkbox in the Calendar list. Show or hide events from all calendars:...
Read more >Open Outlook calendar in its own window | Geekgirl's
Click the Change Icon button. You'll see a bunch of icons included in the Outlook program file. Click the Calendar icon and click...
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 FreeTop 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
Top GitHub Comments
The behaviour of showOnFocus=“false” seems to be inconsistent between using the data-date-show-on-focus attribute, and setting $.fn.datepicker.defaults.showOnFocus in JS. If set using the attribute, the calendar is still displayed the first time the input receives focus.
https://jsfiddle.net/DonDavio/kke1jbbj/8/
This problem still exists today with version 1.6.4.