New filters on the Home Feed, take a look!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Formatting HTML Date input
Post Body

Hi guys, I've got a form with a series of inputs, one being a date input for date of birth, all this information will go into a user profile.

On page load I want the date input to display today's date rather than being blank, as this mucks up the page layout. Currently it's blank until I click on it, then it displays today's date and fixes the layout.

I'd also like to prevent the date input from displaying any future dates. I know you can use the "max" attribute, but is there a way to set it to the value of a variable for instance, rather than physically writing today's date?

Any help is greatly appreciated.

Author
Account Strength
90%
Account Age
5 years
Verified Email
Yes
Verified Flair
No
Total Karma
776
Link Karma
53
Comment Karma
723
Profile updated: 1 day ago
Posts updated: 9 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago