import joi from "joi" ; import { PageController } from "./PageController" ; deprecated export class StartDatePageController extends PageController { components : any ; get stateSchema ( ) { const keys = this . components . getStateSchemaKeys ( ) ; const name = this . components . formItems [ 0 ] . name ; const d = new Date ( ) ; d . setDate ( d . getDate ( ) + 28 ) ; const max = `${ d . getMonth ( ) + 1 }-${ d . getDate ( ) }-${ d . getFullYear ( ) }` ; keys [ name ] = keys [ name ] . min ( "now" ) . max ( max ) ; return joi . object ( ) . keys ( keys ) ; } }