*
The moose likes Java Micro Edition and the fly likes DateField Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "DateField Validation" Watch "DateField Validation" New topic
Author

DateField Validation

rajeshyadav mobi
Greenhorn

Joined: Apr 18, 2011
Posts: 25
Hi,
This is Rajesh
Can i do date field validation , I am using
datefield df=new DateField("", DateField.DATE);
If user doesnt select any date , it must show alert. instead of internally giving null pointer exception
Please Help me out
Thanks & Regards
Rajesh
rajeshyadav mobi
Greenhorn

Joined: Apr 18, 2011
Posts: 25
Hi,
I got a way to solve the problem,
datefield df=new DateField(",DateField.Date);
try
{
String date=df.getDate.toString();
}
catch(NullPointerException e)
{
give same alert;
AlertMsg();
}
 
 
subject: DateField Validation
 
Similar Threads
Time format problem in MIDLet
How to retrieve day in MIDlet?
DateField display variations
DateField Question
j2me: Convert String to Date