timepicker: automatically activate am/pm when the element contains class time--12
This commit is contained in:
parent
a872f78e24
commit
dec7411f30
1 changed files with 5 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
||||||
* - maxHours
|
* - maxHours
|
||||||
* - automatically jump from hours to minutes when typing in a number
|
* - automatically jump from hours to minutes when typing in a number
|
||||||
* - continue stepping from manually input value
|
* - continue stepping from manually input value
|
||||||
|
* - activate meridian on class 'time--12'
|
||||||
*
|
*
|
||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
|
@ -47,6 +48,10 @@
|
||||||
_init: function() {
|
_init: function() {
|
||||||
var self = this;
|
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'))) {
|
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({
|
this.$element.parent('.input-append, .input-prepend').find('.add-on').on({
|
||||||
'click.timepicker': $.proxy(this.showWidget, this)
|
'click.timepicker': $.proxy(this.showWidget, this)
|
||||||
|
|
Loading…
Reference in a new issue