You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unable to create a FormGroup with a type that contains a Date.
export type Person = {
id: string,
birthday: Date
}
private createForm() {
// Type 'Date' is not assignable to type 'ControlsOf<Date>'.
const form1 = new FormGroup<ControlsOf<Person>>({
id: new FormControl<Person["id"]>(),
birthday: new FormGroup<Person["birthday"]>(new Date)
})
// Type 'FormGroup<Date>' is not assignable to type 'FormGroup<ControlsOf<Date>>'.
const form2 = new FormGroup<ControlsOf<Person>>({
id: new FormControl<Person["id"]>(),
birthday: new FormGroup<Date>(new Date)
})
// Argument of type 'Date' is not assignable to parameter of type 'ControlsOf '.
const form3 = new FormGroup<ControlsOf<Person>>({
id: new FormControl<Person["id"]>(),
birthday: new FormGroup<ControlsOf<Person["birthday"]>>(new Date)
})
// Argument of type 'Date' is not assignable to parameter of type 'ControlsOf '.
const form4 = new FormGroup<ControlsOf<Person>>({
id: new FormControl<Person["id"]>(),
birthday: new FormGroup<ControlsOf<Date>>(new Date)
})
// Conversion of type 'Date' to type 'ControlsOf<Date>' may be a mistake.
const form5 = new FormGroup<ControlsOf<Person>>({
id: new FormControl<Person["id"]>(),
birthday: new FormGroup<ControlsOf<Date>>(new Date as ControlsOf<Date>)
})
}
}
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
Is this a regression?
No
Description
I'm unable to create a FormGroup with a type that contains a Date.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
Anything else?
No response
Do you want to create a pull request?
No
The text was updated successfully, but these errors were encountered: