MaskedDateTimeInput, height and format

3 posts, 0 answers
  1. Trond Arild Wahlstrøm
    Trond Arild Wahlstrøm avatar
    22 posts
    Member since:
    Jan 2006

    Posted 06 Dec 2011 Link to this post

    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 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. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 09 Dec 2011 Link to this post

    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"
    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.
    Petar Mladenov
    the Telerik team

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

  3. DevCraft banner
  4. Trond Arild Wahlstrøm
    Trond Arild Wahlstrøm avatar
    22 posts
    Member since:
    Jan 2006

    Posted 09 Dec 2011 Link to this post

    Works like a charm! Thanks a lot! :)
Back to Top