Nate
|
Posted: 12/22/2003, 8:27 AM |
|
I am tring to validate a date in CCS. I have the Default Value set to '01/01/2004' and Date Type set to Date. I need to validate that the user input is >= '01/01/2004'. How do i accomplish this? Thanks
|
|
|
Nate
|
Posted: 12/22/2003, 8:55 AM |
|
I'm using PHP
|
|
|
Nate
|
Posted: 12/22/2003, 10:40 AM |
|
This is what I did, probably not the best way to do it, but it seems to work,
$BeginDate = mktime (0,0,0,1,1,2004);
$MonthPart = substr ($this->s_Reported_Date->GetText(), 0, 2);
$DayPart = substr ($this->s_Reported_Date->GetText(), 3, 2);
$YearPart = substr ($this->s_Reported_Date->GetText(), 6, 4);
$ReportedDate = mktime(0,0,0,$MonthPart,$DayPart,$YearPart);
if($ReportedDate < $BeginDate) {
$this->s_Reported_Date->Errors->addError("Enter another Date");
}
|
|
|
|