DatePicker validation

May 18, 2009 at 9:37 PM

I am trying to implement a date validation against the field of datepicker. My validator works fine for Textbox by adding the following code <font size="2" color="#0000ff"><font size="2" color="#0000ff">

<

</font></font><font size="2" color="#0000ff">

 

</font>

TextBox.Text>

<Binding Path="fieldName" UpdateSourceTrigger="PropertyChanged" Source="{StaticResource myVal}"><font size="2" color="#0000ff"><font size="2" color="#0000ff">

 

</font></font><font size="2" color="#0000ff">

 

</font>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

 

<Binding.ValidationRules><font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

 

<DataErrorValidationRule/><font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

 

</Binding.ValidationRules><font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

 

</Binding><font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

 

</TextBox.Text>

However I even can't add my validation rules into datepicker field. Can someone please share idea about how to do that?

Many thanks.