Skip to content

Instantly share code, notes, and snippets.

@chasebaker21
Created November 19, 2020 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chasebaker21/f451926034b204ba070cdce0d72a2b05 to your computer and use it in GitHub Desktop.
Save chasebaker21/f451926034b204ba070cdce0d72a2b05 to your computer and use it in GitHub Desktop.
// creates controls inside each day of week
initDayTaskInfo(day: DayInfoProject, date: Date) {
let dayTask = this.fb.group({
comments: new FormControl(day.comments),
day: new FormControl(date),
hours: new FormControl(day.hours, (Validators.min(0), Validators.max(24))),
open: new FormControl(day.open),
tasks: this.initTaskInfo(day.tasks)
})
return dayTask;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment