mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that the user should be able to specify an older date for the account expiration of the role/user. Fixes #6120
This commit is contained in:
committed by
Akshay Joshi
parent
f86f58dc56
commit
a2edf317a9
@@ -2820,6 +2820,7 @@ define([
|
||||
placeholder: 'YYYY-MM-DD HH:mm:ss Z',
|
||||
extraClasses: [],
|
||||
helpMessage: null,
|
||||
setMinDate: true,
|
||||
},
|
||||
events: {
|
||||
'blur input': 'onChange',
|
||||
@@ -3008,6 +3009,18 @@ define([
|
||||
data.value = null;
|
||||
}
|
||||
|
||||
var dateSettings = {};
|
||||
if (!data.setMinDate) {
|
||||
dateSettings = {
|
||||
'date': data.value,
|
||||
};
|
||||
} else {
|
||||
dateSettings = {
|
||||
'date': data.value,
|
||||
'minDate': data.value,
|
||||
};
|
||||
}
|
||||
|
||||
this.$el.find('input').first().datetimepicker(
|
||||
_.extend({
|
||||
keyBinds: {
|
||||
@@ -3044,10 +3057,7 @@ define([
|
||||
}
|
||||
},
|
||||
},
|
||||
}, this.defaults.options, this.field.get('options'), {
|
||||
'date': data.value,
|
||||
'minDate': data.value,
|
||||
})
|
||||
}, this.defaults.options, this.field.get('options'), dateSettings)
|
||||
);
|
||||
}
|
||||
this.updateInvalid();
|
||||
|
||||
Reference in New Issue
Block a user