This is a question of how to do it without JavaScript
Imagine JavaScript is disabled in the browser. Is there a way for us to understand the current time on the user machine?
For example can we ask the browser to fill a hidden field in a form?
This is a question of how to do it without JavaScript
Imagine JavaScript is disabled in the browser. Is there a way for us to understand the current time on the user machine?
For example can we ask the browser to fill a hidden field in a form?
You can set the date in a text input like so:
<input type="date" value="2021-10-24" />
However, there's no way to automatically populate that value on the browser side without using JavaScript. That means if you need this to work you'd have to use PHP or some other server side implementation to pre-fill the input with the current date when it's served to the client. Obviously this could have timezone implications and would not be the date on the user's machine, but is probably as close as you'd be able to get with JS disabled.