aspose file tools*
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 Java 8 in Action this week in the Java 8 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();
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DateField Validation
 
Similar Threads
j2me: Convert String to Date
DateField display variations
How to retrieve day in MIDlet?
DateField Question
Time format problem in MIDLet