Permalink
Browse files

remove unnecessary padding

  • Loading branch information...
1 parent 0d3a1ef commit 406551bd222eb99ed2c9efa6aa98ffa3d72436f4 @jdewit committed Oct 7, 2013
Showing with 10 additions and 11 deletions.
  1. +3 −1 index.html
  2. +6 −10 js/bootstrap-timepicker.js
  3. +1 −0 spec/js/MouseEventsSpec.js
View
4 index.html
@@ -105,8 +105,10 @@
$('#timepicker2').timepicker({
minuteStep: 1,
template: 'modal',
+ appendWidgetTo: 'body',
showSeconds: true,
- showMeridian: false
+ showMeridian: false,
+ defaultTime: false
});
</script>
</body>
View
16 js/bootstrap-timepicker.js
@@ -834,26 +834,22 @@
return;
}
- var hour = this.hour < 10 ? '0' + this.hour : this.hour,
- minute = this.minute < 10 ? '0' + this.minute : this.minute,
- second = this.second < 10 ? '0' + this.second : this.second;
-
if (this.showInputs) {
- this.$widget.find('input.bootstrap-timepicker-hour').val(hour);
- this.$widget.find('input.bootstrap-timepicker-minute').val(minute);
+ this.$widget.find('input.bootstrap-timepicker-hour').val(this.hour);
+ this.$widget.find('input.bootstrap-timepicker-minute').val(this.minute);
if (this.showSeconds) {
- this.$widget.find('input.bootstrap-timepicker-second').val(second);
+ this.$widget.find('input.bootstrap-timepicker-second').val(this.second);
}
if (this.showMeridian) {
this.$widget.find('input.bootstrap-timepicker-meridian').val(this.meridian);
}
} else {
- this.$widget.find('span.bootstrap-timepicker-hour').text(hour);
- this.$widget.find('span.bootstrap-timepicker-minute').text(minute);
+ this.$widget.find('span.bootstrap-timepicker-hour').text(this.hour);
+ this.$widget.find('span.bootstrap-timepicker-minute').text(this.minute);
if (this.showSeconds) {
- this.$widget.find('span.bootstrap-timepicker-second').text(second);
+ this.$widget.find('span.bootstrap-timepicker-second').text(this.second);
}
if (this.showMeridian) {
this.$widget.find('span.bootstrap-timepicker-meridian').text(this.meridian);
View
1 spec/js/MouseEventsSpec.js
@@ -71,6 +71,7 @@ describe('Mouse events feature', function() {
$input1.parents('div').find('.add-on').trigger('click');
expect(tp1.isOpen).toBe(true);
+ expect($('.modal').length).toBe(1);
expect(showEvents).toBe(1);
});

0 comments on commit 406551b

Please sign in to comment.