I was hoping you could help?
I am currently using DateTimePicker ui control to allow the user to pick a date and populate a label control with the date.
I also allow the user to paste a date into the control.
What i am trying to do is prevent the user from entering garbage data like "14/02/YYYY". As you can see thats not a valid date since YYYY is not a valid year.
I would like to prevent the user from entering a date like this. One way i can think of is use CustomValidation. How would i go about capturing the invalid data?
Currently I have a public property which i bind the control to called CreationDate
[Required]
public DateTime CreationDate
{
get;
set;
}
In the Xaml i am using a Dataform which is within a Grid
<df:DataField label = "CreationDateLabel">
<Controls:DatePicker SelectedDate={Binding CustomerRecord.CreationDate, Mode=TwoWay}/>
</df:DataField>
Thanks in advance,

New Topic/Question
Reply



MultiQuote


|