Fixed calender control issues with Bootstrap 4

This commit is contained in:
Aditya Toshniwal 2018-10-12 15:02:38 +05:30 committed by Akshay Joshi
parent 6991c06937
commit d6c4911135
3 changed files with 14 additions and 7 deletions

View File

@ -148,7 +148,9 @@ define('pgadmin.node.pga_schedule', [
},{
id: 'jextime', type: 'text', placeholder: gettext('<any>'),
label: gettext('Time'), editable: true, cell: AnyDatetimeCell,
options: {format: 'HH:mm'}, displayFormat: 'HH:mm',
options: {format: 'HH:mm', buttons: {
showToday: false,
}}, displayFormat: 'HH:mm',
modelFormat: 'HH:mm:ss', displayInUTC: false, allowEmpty: true,
cellHeaderClasses:'width_percent_50', modalInUTC: false,
}],

View File

@ -2345,7 +2345,6 @@ define([
clear: 'fa fa-trash',
},
buttons: {
showClear: true,
showToday: true,
},
toolbarPlacement: 'top',
@ -2364,14 +2363,20 @@ define([
'change input': 'onChange',
'changeDate input': 'onChange',
'focus input': 'clearInvalid',
'db.change': 'onChange',
'click': 'openPicker',
'focusout input': 'closePicker',
'change.datetimepicker': 'onChange',
'click': 'togglePicker',
},
openPicker: function() {
togglePicker: function() {
if (this.has_datepicker) {
this.$el.find('input').datetimepicker('toggle');
}
},
closePicker: function() {
if (this.has_datepicker) {
this.$el.find('input').datetimepicker('hide');
}
},
template: _.template([
'<label class="<%=Backform.controlLabelClassName%>"><%=label%></label>',
'<div class="input-group <%=Backform.controlsClassName%>">',

View File

@ -1352,7 +1352,6 @@ define([
clear: 'fa fa-trash',
},
buttons: {
showClear: true,
showToday: true,
},
toolbarPlacement: 'top',
@ -1391,7 +1390,8 @@ define([
this.picker = this.$el.data('DateTimePicker');
},
events: {
'dp.hide': 'closeIt',
'hide.datetimepicker': 'closeIt',
'focusout':'closeIt',
},
closeIt: function(ev) {
var formatter = this.formatter,