question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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"
});

image

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
DonDaviocommented, Jan 11, 2016

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/

3reactions
vppetrovcommented, Jan 25, 2018

This problem still exists today with version 1.6.4.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found