Skip to content

Form Controls exercise in User Focused Data module is impossible? #1138

Description

@alismith-dev

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions