html - How to get the browser current date? -


i use html5 , want user browser current date how can ?

i tried use code doesn't work

date: <br/><input type="date" name="aday" min='atetime.utcnow.tostring("u")' > 

<input type="date" min="" id="demo" />

you can use in javascript.

var d = new date();  date = d.getfullyear() + "-" + ("0" + d.getmonth()).slice(-2) + "-" + ("0" + d.getdate()).slice(-2);
need send date value html input tag (min attribute) can use

document.getelementbyid("demo").attributes["min"] = date;


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -