There is no official support for what you want to do in the current version of the library. In the list of documents all kinds of markup you can create an instance of datepicker on and what happened as a result of the behavior. It is very clear that when instantiating a datepicker in an element<input>
focusing the input (click or tab in it) will show the collector.
There is no markup you can create a datepicker instance that trivially will give you what you want. There are also no configuration options that let you choose which events will trigger the date display.
As a result, some reverse engineering of the library will be required to complete the necessary actions. Fortunately, this is pretty easy.
- datepicker <input>, , focus click:
$('#my-input').datepicker()
.off('focus')
.click(function () {
$(this).datepicker('show');
});
, http://jsfiddle.net/E4K56/1/
(, ), , :
$('#some-button').click(function () {
$('#my-input').datepicker('show');
});