File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DateField Validation

 
rajeshyadav mobi
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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();
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic