Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes


Accepted answer

Permanent link
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

0 votes

Comments

Thanks Donald.

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019

Question asked: Jun 23 '16, 9:50 p.m.

Question was seen: 2,845 times

Last updated: Jun 27 '16, 2:16 a.m.

Confirmation Cancel Confirm