It's all about the answers!

Ask a question

setting default time value in timestamp type of attribute to other than 12:00 PM


Don Yang (7.7k21109138) | asked Jun 23 '16, 9:50 p.m.
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.

Accepted answer


permanent link
Donald Nong (14.5k414) | answered Jun 27 '16, 1:08 a.m.
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());

Don Yang selected this answer as the correct answer

Comments
Don Yang commented Jun 27 '16, 2:16 a.m.

Thanks Donald.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.