xdan/datetimepicker — pull request #191 by danielma (2014-10-24 21:14:55+00:00)
Title: Add ability to toggle datetimepicker

For my application, I wanted a button that could toggle the datetimepicker. Very simple usage

`options.closeOnWithoutClick` enabled

```javascript
$("#button").on('mousedown', function() {
$("#picker").datetimepicker("toggle");
return false;
});
```

`options.closeOnWithoutClick` disabled

```javascript
$("#button").on('click', function() {
$("#picker").datetimepicker("toggle");
});
```

This is good for what I need right now, but it doesn't work with `lazyInit`. If `lazyInit` is on and the picker hasn't been initialized yet, `.datetimepicker("toggle")` won't do anything.

I think it's a pretty common need for people to want an icon button next to the input field that people can click on to toggle the picker. In my application, it's a bootstrap `.input-group-addon`. If you think it's a good idea, I can also prepare a PR with a `toggleButton` option where you could set a button that would work with lazyInit