Skip to content

Commit

Permalink
Fix salesagility#10364 - Adding now option in Datetime fields
Browse files Browse the repository at this point in the history
  • Loading branch information
SinergiaCRM committed Feb 26, 2024
1 parent c4f9dcc commit 01e4291
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 226 deletions.
244 changes: 20 additions & 224 deletions include/SugarFields/Fields/Datetimecombo/Datetimecombo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,14 @@ Datetimecombo.prototype.html = function(callback) {
if(this.allowEmptyHM){
text += '\n<option></option>';
}
var minuteSteps = parseInt(SUGAR.config.datetime_combo_minute_interval);
var minuteSteps = 15;

if (typeof SUGAR.config.datetime_combo_minute_interval !== 'undefined') {
minuteSteps = parseInt(SUGAR.config.datetime_combo_minute_interval);
}
if (this.defaultValue.includes('now')) {
minuteSteps = 1;
}
}
for (i = 0; i < 60; i += minuteSteps) {
text += '\n<option value="' + (i < 10 ? '0' : '') + i + '" ' + (this.mins == i ? "SELECTED" : "") + '>' + (i < 10 ? '0' : '') + i + '</option>';
}
Expand Down

0 comments on commit 01e4291

Please sign in to comment.