I want to be able to run an alert if the user does not change the date/calender field.
My data is set up like this
StartDate = new DateField("Start Date ", DateField.DATE);
cal1 = Calendar.getInstance();
cal1.set(Calendar.YEAR, 2009);
cal1.set(Calendar.MONTH, 0);
cal1.set(Calendar.DAY_OF_MONTH, 1);
StartDate.setDate(cal1.getTime());
And so far I have this
else if (strStartDate == "1/1/2009;") {
AlertNameNotEntered.setString("Please enter a Start Date");
Display.setCurrent(AlertNameNotEntered);
}
This does not work as this does not run the alert and add the date normally. I have tried a few options but they are unsuccessful.
Can anyone help by giving me the code to insert into the if statement?
Thanks