getFullYear() error
Posted: Wed Feb 08, 2023 6:30 pm
While attempting to run a slightly modified version of the sample code from https://github.com/nuBuilder/nuBuilder- ... _date_time
I get the following error in the console.
nucommon.js?ts=20230208091545:2832 Uncaught TypeError: d.getFullYear is not a function
at nuSetDateValue (nucommon.js?ts=20230208091545
13)
at reportCreated (index.php:25:2)
at xhr.onreadystatechange (nuajax.js?ts=20230208091545:227:7)
Any ideas? I get the same error with just a cut and paste from the example too.
Code: Select all
function getCurrentDate() {
var d = new Date();
var df = nuPad2(d.getMonth() + 1) + '/' + nuPad2(d.getDate() + '/' + d.getFullYear());
return df;
}
nucommon.js?ts=20230208091545:2832 Uncaught TypeError: d.getFullYear is not a function
at nuSetDateValue (nucommon.js?ts=20230208091545
at reportCreated (index.php:25:2)
at xhr.onreadystatechange (nuajax.js?ts=20230208091545:227:7)
Any ideas? I get the same error with just a cut and paste from the example too.