You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you set a defaultTimeDelta to null for example then load a form with a time defined for both fields, start and end.
If you set an anchor to start.
Then each time you modify the start field it'll add 3 hours to the end one.
defaultTimeDelta is not used in this case.
It works only if end date field is empty.
So I modified your code like this to have the defaultTimeDelta value used in all cases.
_timeChanged: function(target){
if (!this.startTimeInput || !this.endTimeInput) {
return;
}
var startTime = this.settings.parseTime(this.startTimeInput);
var endTime = this.settings.parseTime(this.endTimeInput);
// Added those lines to have defaultTimeDelta really functionnal
if (this.settings.defaultTimeDelta !== null) {
this.timeDelta = this.settings.defaultTimeDelta;
} else {
this.timeDelta = null;
}
if (!startTime || !endTime) {
etc.
May be you will have a better solution, but it's works for me like this.
Pretty sure it's the same for DefaultDateDelta ... but I do not use it right now ;)
Regards,
Hervé
The text was updated successfully, but these errors were encountered:
Hello,
If you set a defaultTimeDelta to null for example then load a form with a time defined for both fields, start and end.
If you set an anchor to start.
Then each time you modify the start field it'll add 3 hours to the end one.
defaultTimeDelta is not used in this case.
It works only if end date field is empty.
So I modified your code like this to have the defaultTimeDelta value used in all cases.
May be you will have a better solution, but it's works for me like this.
Pretty sure it's the same for DefaultDateDelta ... but I do not use it right now ;)
Regards,
Hervé
The text was updated successfully, but these errors were encountered: