[v10] Add date input day, month and year options#1869
[v10] Add date input day, month and year options#1869colinrotherham wants to merge 3 commits intosupport/10.xfrom
day, month and year options#1869Conversation
a197186 to
3cbd7d8
Compare
3cbd7d8 to
f10de3c
Compare
|
I've gone with this syntax: {{ dateInput({
fieldset: {
legend: {
text: "What is your date of birth?",
size: "l",
isPageHeading: true
}
},
year: {
value: "2025"
error: true
},
values: {
year: "1984"
}
}) }}But which values wins?We currently prioritise the E.g. We've had this line in the Nunjucks template for a while: value: item.value or params.values[item.name],So I've assumed this behaviour should stay, with values set in this priority order:
We do something similar in radios/checkboxes where |
|
@colinrotherham that priority order makes sense to me. There's also the option of not supporting For prototyping at least, I'd expect values to be set using |
f10de3c to
bd26c13
Compare
5ea3309 to
836faab
Compare
frankieroberto
left a comment
There was a problem hiding this comment.
Looks good to me. This’ll make using the date input component in prototypes a lot easier.
|
Thanks! Happy for this to go in v10.5.0 with icon buttons and search input? |
bd26c13 to
830117b
Compare
Yep. It’s entirely backwards-compatible. |
|
I agree with the base idea of this, but unsure we should immediately merge this, and wonder if we should think on it for a bit. @anandamaryon1 any thoughts? |
|
|
I like how it abstracts away lots of the code for individual items. Seems much cleaner and more bespoke. I don't really grasp why the standalone And not sure why we still need |



Description
This PR adds individual date input Nunjucks options per field
Closes #1853
Checklist