-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dates bundles into mixin- Has this been done? #38
Comments
There is a date mixin, however, the real issue is that there is no way to write a date field config definition is such a way that neatly describes the association between the elements of a date component. E.g. {
'foo': {
'....': '...'
},
'foo-day': {
'....': '...'
},
'foo-month': {
'....': '...'
},
'foo-year': {
'....': '...'
} I would like to see dates described as single field, with nested fields. {
'foo': {
'day': {
'....': '...'
},
'month': {
'....': '...'
},
'year': {
'....': '...'
}
} |
I think this feature has been discussed in HMPO/hmpo-form-wizard#35 We have the basis for a solution somewhere in brp_app (on the arrange.js controller). Allowing us to take advantage of the date validators in passports-form-controller. But I haven't turned it into a generic controller yet. |
@daniel-ac-martin is there a commit associated with it that you can reference here? If it's good, but you just don't have the time to finish, perhaps someone else can pick it up to get it past the finish line. |
@JoeChapman I'm not certain, but I believe it is this: UKHomeOffice/brp_enquiry_forms@8801c70 i.e. It is some stuff added on top of the base controller rather than using the date controller. |
Quick update: Finally wrote a controller that does this on Saturday. Haven't written any tests yet so haven't published it. Hope to write those tests by the start of next week. Nag me if I forget about it. Once that is done I think we should make HOF's base-controller inherit from it and deprecate the current date-controller. (The plan is to invite hmpo to make use of it and if they approve it can be merged into either the main form-controller of the wizard's controller.) Annoyingly, we need to patch a couple of the validators in HOF as we are more permissive over the date inputs we will accept. (I'd like to get these changes into the form-controller as I believe our approach is superior.) |
@daniel-ac-martin what concerns me is that it will only work on a Saturday! |
@JoeChapman There's just no pleasing some people! |
hahaaa @daniel-ac-martin and @JoeChapman |
Not sure if this is done but it would be helpful
The text was updated successfully, but these errors were encountered: