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

can you provide a jsfiddle?
We got it as close to how it is currently working in ours as we could; if you set the data-date-show-on-focus to true, it works the same as ours (except that ours also opens on clicking the calendar). On setting it to false, it works the same as ours. We can also use the methods in our Javascript, but for some reason couldn't replicate this on jsfiddle; let me know if this helps! Thank you so much!
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.
I've been seeing what DonDavio describes in my project. Setting the defaults via $.fn.datepicker.defaults on page load and using lazy init like the addon example with data-provide="datepicker". First time the input is focused the picker shows. Any subsequent focus works as should be expected. It's like the defaults aren't being applied until after the datepicker has been initialized and shown.
I am having this same issue, the picker shows the first activation even though I'm asking it not to with data-date-show-on-focus="false"
This problem still exists today with version 1.6.4.
Still having the exact same problem. Anybody knows if this is already fixed or not?
Most helpful comment
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/