remove inline styles in radcalendar wrapper div

4 posts, 0 answers
  1. Sandeep
    Sandeep avatar
    5 posts
    Member since:
    Sep 2013

    Posted 06 Sep 2013 Link to this post

    Hi,
    After selecting date in Rad calendar, the calendar wrapper div create following inline style. But due to postion absolute my page UI is distrubing . I want to override this style into position fixed. Can you please suggest a way to overried this inline style.

    <div id="ctl00_ContentPlaceHolder1_txtEndDate_calendar_wrapper" style="visibility: hidden; position: absolute; left: -1000px;
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 06 Sep 2013 Link to this post

    Hi Sandeep,

    You can try the following JavaScript to set the CSS.

    JavaScript:
    <script type="text/javascript">
        function pageLoad() {
            document.getElementById("ctl00_ContentPlaceHolder1_txtEndDate_calendar_wrapper").style.position = "fixed";
        }
    </script>

    Hope this helps,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sandeep
    Sandeep avatar
    5 posts
    Member since:
    Sep 2013

    Posted 06 Sep 2013 Link to this post

    Hi Shinku,
         Thanks for reply. I tried solution which u provide. But position is not set to div as a fixed. Its still showing absolute. I get div properly in javascript. Can is it possible through CSS.
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 Sep 2013 Link to this post

    Hi Sandeep,

    Please have a look at the following CSS to set the position. Please note that when you are changing CSS using JavaScript, the modified styles wont persist after a postback.

    CSS:
    <style type="text/css">
        #ctl00_ContentPlaceHolder1_txtEndDate_calendar_wrapper
        {
            position: fixed !important;
        }
    </style>

    If you have the id of any HTML element then its corresponding style can be set in CSS as #<elementID>{ style }.
     
    Thanks,
    Shinu.
Back to Top