In my android application there is a user defined date. This date should be greater than or equal to the system date. If it is, then process will continue. If it is not,then it gives a toast Follow up date should be greater than or equal to system date.
I used this code segment.
if (sys_date.after(df.parse((date.getText().toString())))) {
Toast.makeText(getActivity(), "Follow up date should be greater than or equal to system date", Toast.LENGTH_SHORT).show();
} else {
//process will continue
}
But the problem is that : it gives the toast message even if the user defined date is equal to the system date.
Anyone could be so kind enough to explain what's going on here and how can I solve this matter.
Thanx in advance