Hi!
I'm trying to use a month/year mask xamMaskedEditor. I tried as someone suggested dd/yyyy but it haven't worked for me!
How do i do it?
Hello skyline_560,
mm/yyyy (ex. 03/2011) is a mask that would work in WPF, but it is not supported in the Silverlight xamMaskedEditor.
Right now, the xamMaskedEditor can only take masks for numbers and characters.
I would suggest submitting a feature request for a Silverlight "xamDateTimeEditor", which I agree would be very useful.
For now, you can use a simple numeric mask like ##/####. You can then do some validation either on a button click or on the LostFocus event to make sure that the entered values are reasonable (ex. month is between 01 and 12 and year is in a set range).
Elizabeth AlbertLocalization Engineer
Hello Elizabeth,
I am trying to apply a date mask for xammaskededitor,by saying Mask="mm/dd/yyyy" ,ValueType="{x:Type,System:DateTime}" and Value="{Binding}" and the outbound type is a string.I am not able to convert the value-its giving me an exception.
Can we place a datemask for xammaskededitor in silverlight?
Hello rockysandy123,
Silverlight's xamMaskedEditor does not support date masks except as strings. For example ##/##/#### could be used, and then validated, and converted to a DateTime value in code.
An alternative would be to use something like the xamCalendar, or dropdowns to select a date.
As I suggested in this thread, please submit a feature request for a xamDatePicker or a xamDateTimeEditor.
Let me know if you have further questions.