How to check for vaild date in the class. how to use the brokenrules.using smartdate.
i have smart date in my class. how should i assign this from my webform.
_Class.date = this.testbox.text; how should i assign this.The way i did it here is wrong
Have a look at the project it should the use of smartdates and how to get at them. Also depending on the Country watch the formating. The date is expected as a string so if its back to front ie. British not US or visa vera it wont work. I generally get my dates returned in dd-MMM-yy format for safety.
The other thing to watch is how you set the property to accept dates, ie format of string.
Hope that helps
Your assignment doesn’t work because you are setting a string value to a date value. Is the date property a date type or a smartdate type?
If the date property is a smartdate:
_Class.date.text = this.textbox.text
or
_Class.date.date = (datetime)this.textbox.text
If the date property is a date:
_Class.date = (datetime)this.textbox.text
Copyright (c) Marimer LLC