From: Jane Sandberg Date: Mon, 14 Oct 2019 21:47:49 +0000 (-0700) Subject: LP1816475: form validation prevents users from making reservations in the past X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a082f011293ac47db0d31924cc1b2c09b28ba8cf;p=contrib%2FConifer.git LP1816475: form validation prevents users from making reservations in the past Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/booking/create-reservation-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/booking/create-reservation-dialog.component.ts index 9e55db0f02..de821a1739 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/create-reservation-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/booking/create-reservation-dialog.component.ts @@ -11,6 +11,7 @@ import {NetService} from '@eg/core/net.service'; import {OrgService} from '@eg/core/org.service'; import {PcrudService} from '@eg/core/pcrud.service'; import {DialogComponent} from '@eg/share/dialog/dialog.component'; +import {notBeforeMomentValidator} from '@eg/share/validators/not_before_moment_validator.directive'; import {PatronBarcodeValidator} from '@eg/share/validators/patron_barcode_validator.directive'; import {ToastService} from '@eg/share/toast/toast.service'; import {AlertDialogComponent} from '@eg/share/dialog/alert.component'; @@ -79,7 +80,7 @@ export class CreateReservationDialogComponent [this.pbv.validate] ), 'emailNotify': new FormControl(true), - 'startTime': new FormControl(), + 'startTime': new FormControl(null, notBeforeMomentValidator(Moment().add('15', 'minutes'))), 'endTime': new FormControl(), 'resourceList': new FormControl(), }, [startTimeIsBeforeEndTimeValidator]