Describe the bug
The fourth question in the README of the Form Controls exercise in the User Focused Data module has the following requirement:
I must collect a date and make sure that date is in the next four weeks.
What is wrong with this content?
The only way I can think of achieving this is by hard-coding the max attribute on a <input type="date"> to 4 weeks from the date at which the code was written.
I don't think hard-coding the date really meets the requirements, given that it's implied that the window is relative to the current date. You could use JS to compute this, but there is also a constraint that only HTML and CSS is used.
How could this be fixed?
To be completely honest I can't think of a specific solution to this, other than changing the requirement completely to a pre-agreed date range. I think this would then require framing the problem such that this makes sense (and I think this might be challenging given the semi-realistic example of selling t-shirts).
Link to content
https://github.com/CodeYourFuture/Module-User-Focused-Data/blob/main/Form-Controls/README.md?plain=1#25
Additional context
It came up as a question from a trainee in London.
Who else might need to know about this?
@CodeYourFuture/global-syllabus
@CodeYourFuture/itp-volunteers
Describe the bug
The fourth question in the README of the Form Controls exercise in the User Focused Data module has the following requirement:
What is wrong with this content?
The only way I can think of achieving this is by hard-coding the
maxattribute on a<input type="date">to 4 weeks from the date at which the code was written.I don't think hard-coding the date really meets the requirements, given that it's implied that the window is relative to the current date. You could use JS to compute this, but there is also a constraint that only HTML and CSS is used.
How could this be fixed?
To be completely honest I can't think of a specific solution to this, other than changing the requirement completely to a pre-agreed date range. I think this would then require framing the problem such that this makes sense (and I think this might be challenging given the semi-realistic example of selling t-shirts).
Link to content
https://github.com/CodeYourFuture/Module-User-Focused-Data/blob/main/Form-Controls/README.md?plain=1#25
Additional context
It came up as a question from a trainee in London.
Who else might need to know about this?
@CodeYourFuture/global-syllabus
@CodeYourFuture/itp-volunteers