*---------------------- Location Section ------------------------ * Library: Aformsaction.vcx * Class: Cntcalendar * Method: ValidateDate() *----------------------- Usage Section -------------------------- *) Description: Validates a passed date *) * Scope: Public * Parameters: *$ Usage: *$ * Returns: *--------------------- Maintenance Section ---------------------- * Change Log: * CREATED 01/04/2005 - NN * MODIFIED *---------------------------------------------------------------- LPARAMETERS tdDateToValidate IF !THISFORM.calendarobj1.IsDescriptionTrue(TTOD(m.tdDateToValidate), "QUEUEABLE DAY") =errormsg("Not a queueable day!") RETURN .F. ENDIF RETURN .T.
*---------------------- Location Section ------------------------ * Library: Aformsaction.vcx * Class: Cntcalendar * Method: Lostfocus() *----------------------- Usage Section -------------------------- *) Description: *) * Scope: Public * Parameters: *$ Usage: *$ * Returns: *--------------------- Maintenance Section ---------------------- * Change Log: * CREATED 01/04/2005 - NN * MODIFIED *---------------------------------------------------------------- LOCAL ltDate as datetime ltDate = CTOT(DTOC(DATE(1900,1,1) - 2 + THIS.DatePicker.DATE) + " 07:00:00 AM") IF this.ValidateDate(m.ltDate) this.SetDates (m.ltDate) ELSE NODEFAULT && prevent leaving focus from this control endif