How to connect time and date into a #text? Jeff
GeoDec 8, 2017This one is fixed, I already figure it out .$w.onReady(function () {$w("#input23").value = formatAMPM();function formatAMPM() { var d = new Date(), months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'], days = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];return days[d.getDay()]+' '+months[d.getMonth()]+' '+d.getDate()+' '+d.getFullYear();}});
This one is fixed, I already figure it out .
$w.onReady(function () {
$w("#input23").value = formatAMPM();
function formatAMPM() {
var d = new Date(),
months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
days = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];
return days[d.getDay()]+' '+months[d.getMonth()]+' '+d.getDate()+' '+d.getFullYear();
}
});