RadDatePicker & visibility loses culture

4 posts, 0 answers
  1. Remko
    Remko avatar
    18 posts
    Member since:
    Feb 2008

    Posted 04 Mar 2008 Link to this post

    I have a simple test with two buttons and two x asp:panel, a raddatepicker is inside panel2 .
     Ajax manager has both buttons as initiator and both panels as updated controls.
    If in the page load i set both panels initially to invisibile. Then button1 server side code sets the culture for the datepicker to "nl-NL" (or any other..), turns the visibilty of panel1=true (nothing in it for the purpose of this example) but does not set the visibility on for panel 2 (so still not visible).
    Button2 code behind sets the visibility=true for the panel2, the datepicker is also now visible, turns panel1 visibility=false.
    drop the calendar down, and the culture is not set.
    Click the button1 again which executes the same culture settings (i tried all three, raddatepicker.culture, raddatepicker.calendar.cultureinfo & raddatepicker.dateinput.cultureinfo) and switches the panel visibility, Click button2, datepicker now visible with correct culture setting.
    I gues this has something to do with the fact that panel2 has never been visible until the second button1 click, but I don't know how to work around this.
    Any help?

    Thanks,
    Kevin.
    p.s i'm using the latest promthius version
    p.p.s using normal full calendar control works.
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 05 Mar 2008 Link to this post

    Hi Kevin,

    I have test the presented scenario and found out that the reason for this issue is that, you could not set the culture property on a Control in asp:Panel initially hiden by Visible="False".
    Please try to hide the panels by using CSS class and apply the following:

    CSS file:

    .hide{
       visibility: hidden;
       display: none;
    }

    Give this a try and let us know how it goes.


    Greetings,
    Maria Ilieva
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Remko
    Remko avatar
    18 posts
    Member since:
    Feb 2008

    Posted 05 Mar 2008 Link to this post

    Maria,
    Thanks, that works. Is this a work around for something that needs to be fixed in promethius?
    Thanks,
    Kevin.
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 07 Mar 2008 Link to this post

    Hello Kevin,

    I'm glad that the suggestion works for you.

    Actually this behavior is not a bug - this is the logic of the controls: it is not possible to update control added in initially hidden parent on the page. So the proposed solution should be used as a general rule.

    All the best,
    Maria Ilieva
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top