timepicker: automatically activate am/pm when the element contains class time--12

This commit is contained in:
Felix Niklas 2015-07-01 13:47:23 +02:00
parent a872f78e24
commit dec7411f30

View file

@ -11,6 +11,7 @@
* - maxHours
* - automatically jump from hours to minutes when typing in a number
* - continue stepping from manually input value
* - activate meridian on class 'time--12'
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@ -47,6 +48,10 @@
_init: function() {
var self = this;
if (this.$element.hasClass('time--12')) {
this.showMeridian = true
}
if (this.showWidgetOnAddonClick && (this.$element.parent().hasClass('input-append') || this.$element.parent().hasClass('input-prepend'))) {
this.$element.parent('.input-append, .input-prepend').find('.add-on').on({
'click.timepicker': $.proxy(this.showWidget, this)