Jes Sie

Jes Sie

  • 663
  • 1.2k
  • 282k

CSS for my asp calendar

Feb 1 2018 3:01 AM
I have an asp calendar with a CSS and a script. Below is the markup
  1. <div class="row">  
  2.                 <div class="col-lg-2">  
  3.                     <span class="fontfamily">????????</span>/ From:  
  4.                 </div>  
  5.                 <div class="col-lg-2">  
  6.                     <asp:TextBox ID="txtPeriodFrom" runat="server" AutoPostBack="True" ReadOnly="True" OnTextChanged="txtPeriodFrom_TextChanged" CssClass="form-control"></asp:TextBox>  
  7.   
  8.                 </div>  
  9.                 <div class="col-lg-1">  
  10.                     <img src="../images/calendar.png" onclick="displayCalendar()" height="25" />  
  11.                     <div id="datePicker">  
  12.                         <asp:Calendar  
  13.                             ID="calEventDate"  
  14.                             OnSelectionChanged="calEventDate_SelectionChanged"  
  15.                             OnDayRender="Calendar1_DayRender"  
  16.                             runat="server" />  
  17.                     </div>  
  18.                 </div>  
  19.                 <div class="col-lg-2">  
  20.                     <span class="fontfamily">???????</span>/ To:  
  21.                 </div>  
  22.                 <div class="col-lg-2 col-lg-pull-1">  
  23.                     <asp:TextBox ID="txtPeriodTo" runat="server" ReadOnly="True" CssClass="form-control"></asp:TextBox>  
  24.                 </div>  
But the output overlaps the dropdown as shown below:
 Below is my CSS and script:
  1. #datePicker {  
  2.             display: none;  
  3.             position: absolute;  
  4.             border: solid 2px black;  
  5.             background-color: white;  
  6.         }  
  7.   
  8. <script>  
  9.         function displayCalendar() {  
  10.             var datePicker = document.getElementById('datePicker');  
  11.             datePicker.style.display = 'block';  
  12.         }  
  13.     </script>  
Hope someone can give a help. 

Answers (2)