Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
660
mm/yyyy Format does not seem to work with a Date Property for XamDateTimeEditor
posted

 For instance if the value from my database is 04/01/1997 then my xamEditor shows 04/0001

 If I change the mask to yyyy/mm then it shows 0004/01

However, if I change my Property (shown below) to a type of string and convert the text manually by building a string from the date it works correctly. Can someone explain why this isn't working?

 

 

 

Here is what my XAML looks like 

<igEditors:XamDateTimeEditor Mask="mm/yyyy" Text="{Binding Path=member.init_dt, UpdateSourceTrigger=LostFocus, ValidatesOnDataErrors=True}" >

Here is what my Code Behind looks like

Public Property init_dt As Nullable(Of Date)

Get

If currentRecord Is Nothing Then

Return Nothing

Else

If IsDBNull(currentRecord("init_dt")) = False Then

Dim odte As Date = currentRecord("init_dt")

Return odte

Else

Return Nothing

End If

End If

End Get

Set(ByVal x As Nullable(Of Date))

Dim dte As Object

If x IsNot Nothing Then

dte = x

Else

dte = DBNull.Value

End If

If Not currentRecord Is Nothing Then

currentRecord("init_dt") = dte

End If

End Set

End Property

Parents Reply Children
No Data