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
End If
End Get
Set(ByVal x As Nullable(Of Date))
Dim dte As Object
If x IsNot Nothing Then
dte = x
dte = DBNull.Value
If Not currentRecord Is Nothing Then
currentRecord("init_dt") = dte
End Set
End Property
2011.1 is the version. Sorry it took so long to reply I was out sick.
Actually I'm mistaken. It didn't used to accept such a mask but in looking into it further it was updated to support it a while back. What version of the control are you using?
The xamMaskedEditor (xamDateTimeEditor is a derived one) does not currently support a date mask that does not contain a day section. You may submit a feature request here.