ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > RocketCake
forum topic indicator Datefield
person icon
rossini
Registered User
Quote
2025-06-12 16:43:24

I would like to insert a date field that updates automatically every day. Also in the format dd-mm-yyyy.

person icon
sammyp
Registered User
Quote
2025-06-12 17:15:26

You can add this from Codepen site.

https://codepen.io/JoseffMoro/pen/NMNMZv

HTML:

<html>

<head>

<font color="000000" face="Vollkorn,
Arial" size="3"><strong><title>date</title>

<script type="text/javascript" src="code.js">

</script>

</head>

<body>


</body>

</html>



JS:

var dateNow = new Date();

function dateFormat(date) {
var year = date.getFullYear();
var month = date.getMonth();
month = month + 1;

if(month < 10) {
month = "0" + month;
}
var day = date.getDate();

if(day < 10) {
day = "0" + day;
}
return day + "/" + month + "/" + year;
}
document.write(dateFormat(dateNow));



In the HTML you can add this code to increase the font size and color: after the Head in html. I'll place it there for you.


<font color="000000" face="Vollkorn,
Arial" size="3"><strong>

person icon
rossini
Registered User
Quote
2025-06-13 11:00:14

Thanks. I've played around with it a bit now. It works as desired.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |