setting default time value in timestamp type of attribute to other than 12:00 PM
Hi, team
In RTC, whenever we want to set the timestamp type of attribute, the calendar will always show the default time
value to be 12:00 PM:
Is there any way to set this default value to other default time such as Due Date setting to 6PM as default, start Date will set to 8AM as default?
I am not sure if script based calculated value can help here as this is only a part of attribute(time value only).
Thanks in advance.
In RTC, whenever we want to set the timestamp type of attribute, the calendar will always show the default time
value to be 12:00 PM:
Is there any way to set this default value to other default time such as Due Date setting to 6PM as default, start Date will set to 8AM as default?
I am not sure if script based calculated value can help here as this is only a part of attribute(time value only).
Thanks in advance.
Accepted answer
We're talking about the Date Picker here. It's not about the default value or calculated value. The time portion of the Date Picker is hard coded and I don't think there is a way to customize it. The code looks like this:
if (this._datePicker == null || this._hourCombo == null || this._minuteCombo == null) {
return new Date();
}
if (!this._useDateTime) {
var date= this.datePickerValue();
date.setHours(12);
date.setMinutes(0);
date.setSeconds(0);
date.setMilliseconds(0);
return date;
}
return this._model.prepOutput(this.datePickerValue(), this._hourCombo.value, this._minuteCombo.value, this.ampmValue());