【问题标题】:Ajax:Calendar - content of calender is small that I cannot see all the daysAjax:日历 - 日历的内容很小,我整天都看不到
【发布时间】:2019-07-05 09:47:09
【问题描述】:

我正在尝试将Ajax Calendar v3.0.20820.6783 用于我的Asp.net-3.5 项目。 它运行良好,但我有一个无法解决的 CSS 问题。

实际的日历尺寸很小,所以不能很好地显示如下,星期六和星期日由于某种原因丢失了。现在没有应用 CSS,默认情况下它是这样的。在 CSS 中增加 width-height 并没有解决问题,我这样做时只有白色背景的大小发生了变化。

另外,再按月份,如下图所示:

我该如何解决?感谢您的任何想法。

创建日历的代码在这里:

<table>
      <tr>
         <td>
           <asp:Label ID="labelallowto" runat="server" Text="AllowedTo:"> </asp:Label> 
         </td>
         <td>
            <div>  
               <asp:TextBox ID="txtAllowedTo" runat="server" autocomplete="off"></asp:TextBox>  
               <cc1:CalendarExtender ID="Calendar1" BehaviorID="behaviorIDAllowFrom" FirstDayOfWeek="Monday" PopupButtonID="imgPopup" runat="server" TargetControlID="txtAllowedFrom" Format="dd/MM/yyyy"> </cc1:CalendarExtender>  
            </div>  
         </td>
</tr></table>

问候。

编辑:当我增加宽度时,例如:

只有背景变大了。

【问题讨论】:

    标签: css asp.net ajax asp.net-ajax


    【解决方案1】:

    添加一个具有以下修复的 CssClass:

    ASPX:

    <cc1:CalendarExtender ID="Calendar1" CssClass="cal_Theme" BehaviorID="behaviorIDAllowFrom" FirstDayOfWeek="Monday" PopupButtonID="imgPopup" runat="server" TargetControlID="txtAllowedFrom" Format="dd/MM/yyyy"> </cc1:CalendarExtender>
    

    CSS:

     .cal_Theme .ajax__calendar_container th {
     padding: 0px;}
     .cal_Theme .ajax__calendar_container td {
     padding: 0px;}
     .cal_Theme .ajax__calendar_month {
      padding-bottom: 3px;
      margin-top: -3.5px}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-08-09
      • 1970-01-01
      • 2017-06-30
      • 1970-01-01
      • 2016-04-24
      • 1970-01-01
      • 2014-02-08
      相关资源
      最近更新 更多