MonthYearPicker set_visible() & get_textBox() not working

4 posts, 0 answers
  1. Shole
    Shole avatar
    3 posts
    Member since:
    Sep 2015

    Posted 23 Sep 2015 Link to this post

    Hi community,

    I have a several RadDatePicker and one RadMonthYearPicker control on a simple page.

    I was trying to hide some of them by condition through client side event only, so I write a handler and try to use client object methods to hide them.

     My handler looks like:

    function handler(){
        alert("before");
        $find("<%= RadDatePicker1.ClientID %>").set_visible(false);
        $find("<%= RadMonthYearPicker1.ClientID %>").set_visible(false);
        alert("after");
    }

    Both alert message pop up without any javascripts error, but none of the control is hidden...

    This is my first trial, then I try to work around with get_textBox() and hide the text box rendered.

     

    function handler2(){
        alert("before");
        $($find("<%= RadDatePicker1.ClientID %>").get_textBox()).hide();
        $($find("<%= RadMonthYearPicker1.ClientID %>").get_textBox()).hide();
        alert("after");
    }

    Now the DatePicker is hidden but not the MonthYearPicker...

    What have I do wrong and how can I achieve such easy tasks?

    I am using Telerik Ajax 2012.1.411, and my browser is Chrome & IE8+

    Thanks!

  2. Shole
    Shole avatar
    3 posts
    Member since:
    Sep 2015
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shole
    Shole avatar
    3 posts
    Member since:
    Sep 2015

    Posted 24 Sep 2015 Link to this post

    Never mind, I find out the cause of the problem is due to some CSS rules added before to fix IE problems according to this post:
    http://www.telerik.com/forums/raddatepicker-rendering-problem-in-ie9-compatibility-mode

     And when set_visible(false) is called, the wrapper element will normally set to "display: none", however it is override by the CSS rules "display: inline !important" as said in the link.

    I am now wrap one more div out of the control and change the visibility of this div as a workaround solution. 
    I wonder if this problem has an official solution?

     

     

     

  5. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 24 Sep 2015 Link to this post

    Hi Shole,

    The issue discussed in the article you are referring to should not be available in the current version of the controls. The current version of the controls is 2015.2.826. Please upgrade to the latest release and see how it works for you.

    Regards,
    Viktor Tachev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top