Timestamp object does not take value from scirpt
dojo.provide("com.halkbank.CurrentDateDefaultValueProvider");
dojo.require("dojo.date"); // We need the date class from Dojo to compare two dates
dojo.require("dojo.date.stamp"); // We need the stamp class to work with ISO date strings
(function() {
dojo.declare("com.halkbank.CurrentDateDefaultValueProvider", null, {
getDefaultValue: function(attribute, workItem, configuration) {
var now = new Date();
var date = dojo.date.stamp.toISOString(now, {milliseconds:true, zulu:true});
console.log("Now is: " + date);
return date;
}
});
})();
dojo.require("dojo.date"); // We need the date class from Dojo to compare two dates
dojo.require("dojo.date.stamp"); // We need the stamp class to work with ISO date strings
(function() {
dojo.declare("com.halkbank.CurrentDateDefaultValueProvider", null, {
getDefaultValue: function(attribute, workItem, configuration) {
var now = new Date();
var date = dojo.date.stamp.toISOString(now, {milliseconds:true, zulu:true});
console.log("Now is: " + date);
return date;
}
});
})();
Timestamp custom atribute does not take default parameter. Scirpt is enabled. RTC version 5.0
Timestamp custom atribute Format(Turkish) : 16 Eki 2014 12:00:00
Timestamp custom atribute Format(Turkish) : 16 Eki 2014 12:00:00
One answer
This code works for me:
/******************************************************************************* * Licensed Materials - Property of IBM * (c) Copyright IBM Corporation 2011. All Rights Reserved. * * Note to U.S. Government Users Restricted Rights: * Use, duplication or disclosure restricted by GSA ADP Schedule * Contract with IBM Corp. *******************************************************************************/ dojo.provide("com.example.DefaultValueProvider"); dojo.require("dojo.date"); // We need the date class from Dojo to use dates dojo.require("dojo.date.stamp"); // We need the stamp class to work with ISO date strings (function() { dojo.declare("com.example.DefaultValueProvider", null, { getDefaultValue: function(attribute, workItem, configuration) { var now=new Date(); var nowtimestamp= dojo.date.stamp.toISOString(now, {milliseconds:true, zulu:true}); console.log("Now is: " + nowtimestamp); return nowtimestamp; } }); })();