It's all about the answers!

Ask a question

dojo script do not work in date field

Pankaj Sharma (40452) | asked Aug 11 '16, 10:12 p.m.
edited Aug 11 '16, 10:14 p.m.
I am using RTC 6.0.2
i am writing a script to update one date filed from other date fields, and its not working, But when i use the same script to populate it in a string attribute it works
below is my code

var BetaReleaseDate = '';

var ReplannedReleaseDate = '';

var CurrentBetaReleaseDate = '';

BetaReleaseDate ='')); ReplannedReleaseDate ='')); //CurrentBetaReleaseDate =''));
if (BetaReleaseDate != null && ReplannedReleaseDate != null ) { return ReplannedReleaseDate; } else if(BetaReleaseDate != null){
return BetaReleaseDate; }
else{ return CurrentBetaReleaseDate; }                }

please help

Accepted answer

permanent link
Ralph Schoon (60.7k33643) | answered Aug 12 '16, 2:53 a.m.

  • Timestamp as an ISO-8601 standard string. Use to convert a Javascript
    Date object to and from an ISO-8601 string. When converting a
    Date object to a string set the
    milliseconds and the
    zulu options to true.
    • To convert the value of a timestamp attribute with the id attributeId to a Date object use:
      var date=;
    • To convert a Date object to an ISO-8601 string use:
      var string=, {milliseconds:true, zulu:true});

you have to convert it back to an iso string using before you return it.
Pankaj Sharma selected this answer as the correct answer

Your answer

Register or to post your answer.