Forum Discussion
_anomDiebolt_
7 years agoQrew Elite
Use this code:
You can test this code from the console. Here is a screenshot with some dummy text set as the description and before the code is executed.
Here is a screenshot after the code is executed:
Notes:
1) This code uses QuickBase's chosen loader library requirejs to load the moment library which is already configured (because QuickBase uses itself uses it on various pages).
2) If you have any need to manipulate dates within your script solutions you should use the moment library as it support every conceivable date manipulation under the sun
MomentJS Library
https://momentjs.com/
If you need further assistance feel free to contact me off-world using the information in my profile:
https://getsatisfaction.com/people/dandiebolt
require(['moment'], function(moment) {
var fromDate = moment().subtract(3, 'months').format('MM/DD/YYYY');
var toDate = moment().format('MM/DD/YYYY');
$("#introText td").html('From ${fromDate} to ${toDate}');
});
You can test this code from the console. Here is a screenshot with some dummy text set as the description and before the code is executed.
Here is a screenshot after the code is executed:
Notes:
1) This code uses QuickBase's chosen loader library requirejs to load the moment library which is already configured (because QuickBase uses itself uses it on various pages).
2) If you have any need to manipulate dates within your script solutions you should use the moment library as it support every conceivable date manipulation under the sun
MomentJS Library
https://momentjs.com/
If you need further assistance feel free to contact me off-world using the information in my profile:
https://getsatisfaction.com/people/dandiebolt
GiuseppeMacri
7 years agoQrew Captain
So, I tried copying that script into Chrome Console with the report open and it didnt work. How do you get the code to initiate?