This is a migrated thread and some comments may be shown as answers.

MaskedDateTimeInput, height and format

2 Answers 90 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Trond Arild Wahlstrøm
Top achievements
Rank 1
Trond Arild Wahlstrøm asked on 06 Dec 2011, 03:03 PM
Hi,
I'm pretty new to the Silverlight radcontrols and I'm a bit stuck on a couple of issues here.

Question 1.

This one I guess is pretty simple. I'm actually having problem setting the height smaller than default:

 

 

 


<
telerik:RadMaskedDateTimeInput Height="19" Width="145" Value="{Binding Path=CurrentCI.Birth, StringFormat='dd.MM.yyyy', Mode=TwoWay,

 

 

 

ValidatesOnExceptions=True, NotifyOnValidationError=True}" x:Name="txtBorn" Mask="dd.MM.yyyy" SelectionOnFocus="CaretToBeginning" IsClearButtonVisible="False"/>

 


No matter how small I set the height(frame) it's stuck at about 22px. But the actual content(the date) is adjusted to the height I set. How can I adjust the height of the frame?

Question 2.

In the same control(as above) the format changes according to the input date I enter. I'm from Norway and we use the format dd.mm.yyyy. If I want the fill in 5th of December 2011, I enter 05.12.2011. On LostFocus it changes the value to 12.05.2011. I've tried the culture property without success.
Anyone have tips on the one?

Thanks in advance! :)

2 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 09 Dec 2011, 01:46 PM
Hi Trond Arild Wahlstrøm,

 Setting the Height lower than 22 will be possible when you also decrease the MinHeight (it is fixed to 22):

<telerik:RadMaskedDateTimeInput x:Name="txtBorn"
                                        Width="145"
                                        Height="19"
                                        MinHeight="19"
                                        Culture="nb-NO"
                                        IsClearButtonVisible="False"
                                        Mask="dd.MM.yyyy"
                                        SelectionOnFocus="CaretToBeginning"
                                        />
As for the DateTimeFormat , I set Norwegian Culture "nb-NO" and everything worked the way you wished.
Still, if this does not work for, you, you can set custom CultureInfo in code behind and play with is DateTimeFormatInfo property.
Please let us know if this works for you.
Greetings,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Trond Arild Wahlstrøm
Top achievements
Rank 1
answered on 09 Dec 2011, 03:26 PM
Works like a charm! Thanks a lot! :)
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Trond Arild Wahlstrøm
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Trond Arild Wahlstrøm
Top achievements
Rank 1
Share this question
or