validation not working on date picker control RRS feed

  • Question

  •  i am trying to do validation between date1 and date2 for this i am using date picker controls binding properties are string the problem is validation is not working on it, since numeric validation is working fine.


    i am using

    Implements INotifyPropertyChanged 

    and under setter using

    Public Property EndDate() As String
                    Return _endDate
                End Get
                Set(ByVal value As String)
                    If StartDate > value Then
                        Throw New ValidationException("Error")
                    End If

                    _endDate = value
                End Set
            End Property

     Can u please tell me what is the issue



    Monday, April 19, 2010 8:16 PM


  • Hi,

       I just tried it should work.

      You may set a break point in your setter .

      Also I see that your EndDate is of type string. But the selectedDate of datepicker is of type DateTime.

      Maybe you should work on that.

    Best Regards

    Wednesday, April 21, 2010 1:32 AM