Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions dist/js/bootstrap-formhelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -14604,6 +14604,20 @@ var BFHTimezonesList = {
},

initCalendar: function() {
var optionString = '',
regExpPattern = /^input(.+)$/,
me = this;

$.each(this.options, function(index, option) {
if (index === 'inputClass') {
// If the data attribute calls for additional class names, merge them
// with the existing ones, rather than replacing them.
me.options.input = me.options.input + ' ' + option;
} else if (regExpPattern.test(index)) {
optionString = optionString + index.replace('input','').toLowerCase() + '="' + option + '" ';
}
});

var iconLeft,
iconRight,
iconAddon;
Expand All @@ -14623,7 +14637,7 @@ var BFHTimezonesList = {
this.$element.html(
'<div class="' + iconAddon + ' bfh-datepicker-toggle" data-toggle="bfh-datepicker">' +
iconLeft +
'<input type="text" name="' + this.options.name + '" class="' + this.options.input + '" placeholder="' + this.options.placeholder + '" readonly>' +
'<input type="text" name="' + this.options.name + '" class="' + this.options.input + '" placeholder="' + this.options.placeholder + '" readonly ' + optionString + '>' +
iconRight +
'</div>' +
'<div class="bfh-datepicker-calendar">' +
Expand Down Expand Up @@ -17353,6 +17367,20 @@ var BFHTimezonesList = {
},

initPopover: function() {
var optionString = '',
regExpPattern = /^input(.+)$/,
me = this;

$.each(this.options, function(index, option) {
if (index === 'inputClass') {
// If the data attribute calls for additional class names, merge them
// with the existing ones, rather than replacing them.
me.options.input = me.options.input + ' ' + option;
} else if (regExpPattern.test(index)) {
optionString = optionString + index.replace('input','').toLowerCase() + '="' + option + '" ';
}
});

var iconLeft,
iconRight,
iconAddon;
Expand All @@ -17372,7 +17400,7 @@ var BFHTimezonesList = {
this.$element.html(
'<div class="' + iconAddon + ' bfh-timepicker-toggle" data-toggle="bfh-timepicker">' +
iconLeft +
'<input type="text" name="' + this.options.name + '" class="' + this.options.input + '" placeholder="' + this.options.placeholder + '" readonly>' +
'<input type="text" name="' + this.options.name + '" class="' + this.options.input + '" placeholder="' + this.options.placeholder + '" readonly ' + optionString + '>' +
iconRight +
'</div>' +
'<div class="bfh-timepicker-popover">' +
Expand Down
4 changes: 2 additions & 2 deletions dist/js/bootstrap-formhelpers.min.js

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion js/bootstrap-formhelpers-datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@
},

initCalendar: function() {
var optionString = '',
regExpPattern = /^input(.+)$/,
me = this;

$.each(this.options, function(index, option) {
if (index === 'inputClass') {
// If the data attribute calls for additional class names, merge them
// with the existing ones, rather than replacing them.
me.options.input = me.options.input + ' ' + option;
} else if (regExpPattern.test(index)) {
optionString = optionString + index.replace('input','').toLowerCase() + '="' + option + '" ';
}
});

var iconLeft,
iconRight,
iconAddon;
Expand All @@ -106,7 +120,7 @@
this.$element.html(
'<div class="' + iconAddon + ' bfh-datepicker-toggle" data-toggle="bfh-datepicker">' +
iconLeft +
'<input type="text" name="' + this.options.name + '" class="' + this.options.input + '" placeholder="' + this.options.placeholder + '" readonly>' +
'<input type="text" name="' + this.options.name + '" class="' + this.options.input + '" placeholder="' + this.options.placeholder + '" readonly ' + optionString + '>' +
iconRight +
'</div>' +
'<div class="bfh-datepicker-calendar">' +
Expand Down
16 changes: 15 additions & 1 deletion js/bootstrap-formhelpers-timepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@
},

initPopover: function() {
var optionString = '',
regExpPattern = /^input(.+)$/,
me = this;

$.each(this.options, function(index, option) {
if (index === 'inputClass') {
// If the data attribute calls for additional class names, merge them
// with the existing ones, rather than replacing them.
me.options.input = me.options.input + ' ' + option;
} else if (regExpPattern.test(index)) {
optionString = optionString + index.replace('input','').toLowerCase() + '="' + option + '" ';
}
});

var iconLeft,
iconRight,
iconAddon;
Expand All @@ -83,7 +97,7 @@
this.$element.html(
'<div class="' + iconAddon + ' bfh-timepicker-toggle" data-toggle="bfh-timepicker">' +
iconLeft +
'<input type="text" name="' + this.options.name + '" class="' + this.options.input + '" placeholder="' + this.options.placeholder + '" readonly>' +
'<input type="text" name="' + this.options.name + '" class="' + this.options.input + '" placeholder="' + this.options.placeholder + '" readonly ' + optionString + '>' +
iconRight +
'</div>' +
'<div class="bfh-timepicker-popover">' +
Expand Down