Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DateItem validation not working

    Using smartgwt 2.2 on IE8.

    Just want to display the validation error icon if user types ina wrong date format.
    Tried the std way as given below but still get uncaught exception when trying to prse the input into date.

    Please let me know if there is solution.

    Code:
     startDateFld.setUseTextField(true);
    		startDateFld.setInputFormat(DateDisplayFormat.TOUSSHORTDATE.getValue());
    		startDateFld.setDisplayFormat(DateDisplayFormat.TOUSSHORTDATE);	
    		startDateFld.setRequired(true);
    Code:
    searchForm.addSubmitValuesHandler(new SubmitValuesHandler() {
    			
    			@Override
    			public void onSubmitValues(SubmitValuesEvent event) {
    				SC.say("Validating enter");
    				searchForm.validate();
    			}
    		});
Working...
X