Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display an existing date in Input type="date"?

Status
Not open for further replies.

leifoet

Technical User
Jan 31, 2016
203
BE
Method : initially the existing LEVdate (from the database) should appear - is it no longer correct than a new LEVdate must be entered

Code:
<input type="date" name="LEVdate" placeholder="yyyy-mm-dd" value="<%=rs("LEVdate")%>" style="border 1px solid red; font-size:13px; color:#0000FF; background-color:#E0FFFF;">
(1) How can I call the existing LEVdate from the database in this input syntax

If I try this separately then I get the saved LEVdate perfectly
Code:
<%=("hello")&" "&rs("LEVdate")%>

(2) how can I change the color of the border - the border code above does not work

Thanks for tips.


 
Hi

According to StackOverflow, the date type expects a default value in this form:

<input type="date" value="2013-01-08">

What form is rs("LEVdate") in?

Look here as well :


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
from GriffMG said:
What form is rs("LEVdate") in?
= in the Access database the date in this field 'LEVdate' is (saved) as DD/MM/YYYY (also the regionformat)
Do I have to change codes somewhere? (to come to YYYY/MM/DD in the input)
Thanks for tips

 
You need it formatted YYYY-MM-DD

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top