0
Reply

Arraylist comparison.

Arunkumar

Arunkumar

Oct 15 2006 12:42 PM
1.7k
I'm working on a leave page, where in i would poupulate the calendar year holidays at the load of the page into an array list, and when the user selects any of the day which is declared holiday, it should pop up an alert message giving "Day you have chosen is already a declared holiday". This is the scenario...

My problem is!!!

Getting the entered leave date of an employee in textbox, txtleavefrm
frmdate = txtleavefrm.value

I navigate through the arraylist using a forloop like this...

for(int i=0;i<arylstholidays.count;i++)
{

if(convert.tostring(txtleavefrm.value) == convert.tostring(arylstholidays[i]))

{
page.register("clientscript",alert'Entered day is already an holiday') //dont check for syntax in this line
}
}

But the one in the bold, the condition checking is not working...do let me know how to compare arraylist items against a datetime field