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.
-
+
@@ -186,9 +186,9 @@
A Timepicker Inside A Modal
<script type="text/javascript" src="js/bootstrap-timepicker.min.js"></script>
</head>
<body>
- <div> class="modal hide fade">
+ <div> class="modal hide fade">
<div class="modal-header">
- <h1>Timepicker inside a modal</h1>
+ <h1>Timepicker inside a modal</h1>
</div>
<div class="modal-body">
<div class="bootstrap-timepicker">
@@ -267,7 +267,7 @@ template The picker widget template
| template |
- 'dropdown' (default)
+ 'dropdown' (default)
'modal'
false
|
@@ -309,7 +309,7 @@ template The picker widget template
showMeridian |
true (default)
- false
+ false
|
12hr mode
@@ -320,7 +320,7 @@ template The picker widget template
| showInputs |
true (default)
- false
+ false
|
Shows the text inputs in the widget.
@@ -342,6 +342,11 @@ template The picker widget template
| false |
Show modal backdrop. |
+
+ | timeSeparator |
+ ':' |
+ Sets the string to be used between the time inputs. |
+
@@ -397,5 +402,3 @@
Update Triggered when the date is updated
-
-
diff --git a/js/bootstrap-timepicker.js b/js/bootstrap-timepicker.js
index c8208bbf..dfaf452c 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.timeSeparator = options.timeSeparator;
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 ?
' | '+
- ' | '
+ ' | '
: '') +
'
'+
''+
'| '+ hourTemplate +' | '+
- ': | '+
+ '' + this.timeSeparator + ' | '+
''+ minuteTemplate +' | '+
(this.showSeconds ?
- ': | '+
+ '' + this.timeSeparator + ' | '+
''+ secondTemplate +' | '
: '') +
(this.showMeridian ?
@@ -281,16 +282,16 @@
: '') +
'
'+
''+
- ' | '+
+ ' | '+
' | '+
- ' | '+
+ ' | '+
(this.showSeconds ?
' | '+
- ' | '
+ ' | '
: '') +
(this.showMeridian ?
' | '+
- ' | '
+ ' | '
: '') +
'
'+
'
';
@@ -1089,7 +1090,8 @@
showMeridian: true,
template: 'dropdown',
appendWidgetTo: 'body',
- showWidgetOnAddonClick: true
+ showWidgetOnAddonClick: true,
+ timeSeparator: ':'
};
$.fn.timepicker.Constructor = Timepicker;