From 39e0b90fae75e9a993de4a4a31272ce4f2156c7d Mon Sep 17 00:00:00 2001 From: Daniel Groves Date: Wed, 22 Oct 2014 12:14:47 +0100 Subject: [PATCH 1/3] Adds support time separator config --- js/bootstrap-timepicker.js | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/js/bootstrap-timepicker.js b/js/bootstrap-timepicker.js index c8208bbf..992f389c 100644 --- a/js/bootstrap-timepicker.js +++ b/js/bootstrap-timepicker.js @@ -29,6 +29,7 @@ this.template = options.template; this.appendWidgetTo = options.appendWidgetTo; this.showWidgetOnAddonClick = options.showWidgetOnAddonClick; + this.timeSeperator = options.timeSeperator; this._init(); }; @@ -242,10 +243,10 @@ templateContent; if (this.showInputs) { - hourTemplate = ''; - minuteTemplate = ''; - secondTemplate = ''; - meridianTemplate = ''; + hourTemplate = ''; + minuteTemplate = ''; + secondTemplate = ''; + meridianTemplate = ''; } else { hourTemplate = ''; minuteTemplate = ''; @@ -255,24 +256,24 @@ templateContent = ''+ ''+ - ''+ + ''+ ''+ - ''+ + ''+ (this.showSeconds ? ''+ - '' + '' : '') + (this.showMeridian ? ''+ - '' + '' : '') + ''+ ''+ ' '+ - ''+ + ''+ ' '+ (this.showSeconds ? - ''+ + ''+ '' : '') + (this.showMeridian ? @@ -281,16 +282,16 @@ : '') + ''+ ''+ - ''+ + ''+ ''+ - ''+ + ''+ (this.showSeconds ? ''+ - '' + '' : '') + (this.showMeridian ? ''+ - '' + '' : '') + ''+ '
   
'+ hourTemplate +':' + this.timeSeperator + ''+ minuteTemplate +':' + this.timeSeperator + ''+ secondTemplate +'
  
'; From 0f00c9e3f30105be713549529b7c961d7be8d30a Mon Sep 17 00:00:00 2001 From: Daniel Groves Date: Wed, 22 Oct 2014 12:22:05 +0100 Subject: [PATCH 2/3] Sets default separator --- js/bootstrap-timepicker.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/bootstrap-timepicker.js b/js/bootstrap-timepicker.js index 992f389c..dfaf452c 100644 --- a/js/bootstrap-timepicker.js +++ b/js/bootstrap-timepicker.js @@ -29,7 +29,7 @@ this.template = options.template; this.appendWidgetTo = options.appendWidgetTo; this.showWidgetOnAddonClick = options.showWidgetOnAddonClick; - this.timeSeperator = options.timeSeperator; + this.timeSeparator = options.timeSeparator; this._init(); }; @@ -270,10 +270,10 @@ ''+ ''+ ''+ hourTemplate +' '+ - '' + this.timeSeperator + ''+ + '' + this.timeSeparator + ''+ ''+ minuteTemplate +' '+ (this.showSeconds ? - '' + this.timeSeperator + ''+ + '' + this.timeSeparator + ''+ ''+ secondTemplate +'' : '') + (this.showMeridian ? @@ -1090,7 +1090,8 @@ showMeridian: true, template: 'dropdown', appendWidgetTo: 'body', - showWidgetOnAddonClick: true + showWidgetOnAddonClick: true, + timeSeparator: ':' }; $.fn.timepicker.Constructor = Timepicker; From 73a4b45f7dda3cf9baf281717beaf32a2555212e Mon Sep 17 00:00:00 2001 From: Daniel Groves Date: Wed, 22 Oct 2014 12:22:25 +0100 Subject: [PATCH 3/3] Docs update --- index.html | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 3a11c359..9ad74006 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ --- -
@@ -43,7 +43,7 @@

Installation


Demos


-

Default timepicker. Value = ()

+

Default timepicker. Value = ()

@@ -154,7 +154,7 @@

Demos


Inside a modal with backdrop enabled, inputs disabled and with a preset value.

-
- -