Skip to content

Commit

Permalink
Changed timepicker to be added right after input by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Y0lk committed Jul 18, 2017
1 parent 53e7ed1 commit cc23153
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions js/date_picker/picker.time.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,7 @@
ampmclickable: true, // set am/pm button on itself
darktheme: false, // set to dark theme
twelvehour: true, // change to 12 hour AM/PM clock from 24 hour
vibrate: true, // vibrate the device when dragging clock hand
container: 'body' //container
vibrate: true // vibrate the device when dragging clock hand
};

// Show or hide popover
Expand Down Expand Up @@ -410,8 +409,12 @@
this.spanHours.html(this.hours);
this.spanMinutes.html(leadingZero(this.minutes));
if (!this.isAppended) {
// Append popover to body
this.popover.insertAfter(this.options.container);
// Append popover to input by default
if(this.options.hasOwnProperty('container'))
this.popover.appendTo(this.options.container);
else
this.popover.insertAfter(this.input);

if (this.options.twelvehour) {
if (this.amOrPm === 'PM'){
this.spanAmPm.children('#click-pm').addClass("text-primary");
Expand Down

0 comments on commit cc23153

Please sign in to comment.