【问题标题】:using datepicker with different UI-theme than the rest of the site使用与网站其他部分不同的 UI 主题的日期选择器
【发布时间】:2013-10-31 11:23:46
【问题描述】:

我在我的 asp.net Web 应用程序中使用 Jquery ui。我正在使用自定义版本的 jquery UI。现在,我需要修改日历 css(jquery ui datepicker)。我想使用主题翻转并仅获取与 datepicker 的新外观相关的 css/images/js,如下所示:

http://forum.jquery.com/topic/using-datepicker-with-different-ui-theme-than-the-rest-of-the-site

我需要采取哪些步骤来仅自定义我的 datepickedr。另外,在自定义 datepicker 时,我会包含两个 jquery ui css ?

请推荐

【问题讨论】:

    标签: jquery asp.net css jquery-ui datepicker


    【解决方案1】:

    我建议使用另一个 jquery 插件,这样您就不会在应用程序中破坏或冲突样式,一些示例Jquery Calendar Plugins

    您也可以尝试使用 CSS 命名空间在特定元素上使用样式,例如:

    .containerClass .datepicker { ... !important }
    .containerClass .ui.header { ... !important}
    etc...
    

    不好的是,您必须为 datepicker 使用的所有类手动执行此操作。使用 !important 以使样式占上风,尽管这不是一种好的做法。

    【讨论】:

      猜你喜欢
      • 2013-07-27
      • 2020-08-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-04
      • 1970-01-01
      • 2011-10-28
      相关资源
      最近更新 更多