I’m not really sure what you’re asking for.
HTML forms can only eventually pass key/value pairs of strings, no matter what the control (except for file uploads, but that’s another story entirely). To create a date control, you would have to set up logic regarding:
- Figuring out which date to pass. This could theoretically be accomplished by using a date picker widget of some sort.
- Configuring the string format which is passed via the form. It has to be reduced down to a string, and certain forms are going to want certain date formats. For example, YYYY-MM-DD vs DD/MM/YYYY.
- Validation. It has to deal with whether or not the date is potentially valid, if it is picked from a widget. If it’s a static date, that still has to be programmatically defined somewhere.
What you’re asking isn’t particularly simple. It’s theoretically possible to add an additional set of configuration variables for a form which specify date format and field name to pass the current date as a hidden form variable — but that’s a pretty specific case.