textbox and calendar

4 posts, 0 answers
  1. ronald
    ronald avatar
    54 posts
    Member since:
    Jan 2011

    Posted 22 Feb 2011 Link to this post

    Hi,

    I need to display a calender while the user focus on the textbox. How can I achieve this?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Feb 2011 Link to this post

    Hi,


    One suggestion is attaching GotFocus event to RadMaskedTextBox and setting calendar control's Visibility.

    private void DropoffDateTime_GotFocus(object sender, RoutedEventArgs e)
    {
        // Set Calendar Visibility property to "Visible"
    }


    Also check the RadDateTimePicker control and see whether suits your need.


    -Shinu.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 25 Feb 2011 Link to this post

    Hi ronald,

    You can open the calendar when mouse down event happens. Check the code bellow:
    radDatePicker.AddHandler(UIElement.MouseDownEvent, new MouseButtonEventHandler((radDatePicker_MouseDown)), true);
      
      
    private void radDatePicker_MouseDown(object sender, MouseButtonEventArgs e)
            {
                radDatePicker.IsDropDownOpen = true;
            }


    Regards,
    Kaloyan
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  5. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 25 Feb 2011 Link to this post

    Hi ronald,

    You can open the calendar when mouse down event appears. Check the code bellow:
    radDatePicker.AddHandler(UIElement.MouseDownEvent, new MouseButtonEventHandler((radDatePicker_MouseDown)), true);
      
      
    private void radDatePicker_MouseDown(object sender, MouseButtonEventArgs e)
            {
                radDatePicker.IsDropDownOpen = true;
            }


    Regards,
    Kaloyan
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top