Page 1 of 1

problem displaying initial value edibox with datatype date

Posted: Fri Dec 17, 2021 5:29 pm
by Michael Fiil
Why is the inital value inserted to editbox field with data type date not showing?

this is the complete html of the page

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Page</title>
<meta name="generator" content="WYSIWYG Web Builder 16 - https://www.wysiwygwebbuilder.com">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="Untitled1.css" rel="stylesheet">
<link href="index.css" rel="stylesheet">
</head>
<body>
<div id="wb_indexLayoutGrid1">
<div id="indexLayoutGrid1">
<div class="row">
<div class="col-1">
</div>
<div class="col-2">
<input type="date" id="indexEditbox1" style="display:block;width: 100%;height:26px;z-index:0;" name="indexEditbox1" value="20-12-2021" spellcheck="false">
</div>
<div class="col-3">
</div>
</div>
</div>
</div>
</body>
</html>

best regards Michael Fiil Denmark

Re: problem displaying initial value edibox with datatype date

Posted: Fri Dec 17, 2021 6:15 pm
by Pablo
The format of the date is not correct. It should be YYYY-MM-DD

Note that this is unrelated to the software. This is standard HTML functionality.
https://stackoverflow.com/questions/698 ... e-to-today

Re: problem displaying initial value edibox with datatype date

Posted: Fri Dec 17, 2021 6:22 pm
by Joe_120
Entering date means it's waiting for a date input. If you preview and click in the input, a calendar will appear. If you set it to text it will show the date you set. What is it that you are trying to achieve?

Joe

Re: problem displaying initial value edibox with datatype date

Posted: Fri Dec 17, 2021 6:25 pm
by Michael Fiil
Thank you Pablo,

But it means that it is not possible to display european standard date format dd-mm-yyyy ??
Thank you in advance :-)

Kind regards Michael Fiil

Re: problem displaying initial value edibox with datatype date

Posted: Fri Dec 17, 2021 6:30 pm
by Michael Fiil
Thank you Joe,

I know - but i need to be able to pick a date and that's why the calendar control is important on the page.
European date format is dd-mm-yyyy which is included in the datatype but not showing

Kind regards Michael

Re: problem displaying initial value edibox with datatype date

Posted: Fri Dec 17, 2021 6:37 pm
by Michael Fiil
Joe,

My goal with the page:
The page will later changed to a asp page, which need to be called with parameters. So initial the page should display today as from date and add one day to today and display as todate. If submit the page calls another page with the two dates as parameter. In my case it will be asp but it could also be php.

Kind regards Michael

Re: problem displaying initial value edibox with datatype date

Posted: Fri Dec 17, 2021 6:43 pm
by Michael Fiil
Pablo now i see, what you mean...

If initial value is set to 2021-12-20 it will still display as 20-12-2021 - european - strange - but that works :-)

Thank you