Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DateField Validation

 
rajeshyadav mobi
Greenhorn
Posts: 25
  • 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
  • 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