This is a migrated thread and some comments may be shown as answers.

remove inline styles in radcalendar wrapper div

3 Answers 84 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Sandeep
Top achievements
Rank 1
Sandeep asked on 06 Sep 2013, 10:43 AM
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;

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 06 Sep 2013, 11:38 AM
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.
0
Sandeep
Top achievements
Rank 1
answered on 06 Sep 2013, 11:53 AM
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.
0
Shinu
Top achievements
Rank 2
answered on 09 Sep 2013, 05:15 AM
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.
Tags
Calendar
Asked by
Sandeep
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Sandeep
Top achievements
Rank 1
Share this question
or