r - 如何从 shinyWidget 更改 airDatepicker 中日历图标的大小?
问题描述
我在仪表板上使用airDatepicker
from shinyWidget
:
如图所示,我已成功更改输入容器的大小,但没有更改日历图标的容器(shinywidget 放置日历图标的框)。我想改变的是用黄色包围的框,而不是我用红色边框标记的图标本身。
目前我的代码如下所示:
tags$head( tags$style( HTML("
#choosedate {font-size: 13px; height: 25px;}
#datepickers-container > div > nav {font-size: 13px;}
#datepickers-container > div > div.datepicker--content {font-size: 13px;}
#datepickers-container > div > div.datepicker--buttons > span {font-size: 13px;}
#choosedate_button > i {font-size: 13px; max-height: 25px; height: 25px;}
")))
我将所有字体大小设置为 13px,包括日历图标的大小。在第 6 行,这部分不起作用:max-height: 25px; height: 25px;
.
我尝试使用该行代码来更改日历图标容器的高度,使其与设置为 25px 的日期选择器输入容器相匹配。
我该怎么做?
谢谢你。
解决方案
这与您上一个问题中其他 div 的过程相同:
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
tags$head(tags$style(HTML('
#choosedate {font-size: 75%}
#datepickers-container > div > nav {font-size: 75%;}
#datepickers-container > div > div.datepicker--content {font-size: 75%;}
#datepickers-container > div > div.datepicker--buttons > span {font-size: 75%;}
#choosedate_button > i {font-size: 75%;}
'))),
airDatepickerInput(inputId = "choosedate", label = "month range", range = TRUE, placeholder = "choose month range", dateFormat = "M yy", view = "months", minView = "months", clearButton = TRUE,
autoClose = TRUE, update_on = "close", inline = FALSE, monthsField = "monthsShort", separator = " - ",
width = "161px", value = c("2010-01-01", "2019-12-31"), addon = "right")
)
server <- function(input, output, session) {}
shinyApp(ui, server)
推荐阅读
- dask - 如何在 Dask 中为 GroupBy 添加自定义聚合函数?例如平均值、众数、中位数、第 95 个百分位数等
- flutter - centerTitle 和 TextAlign.centre 有什么区别?
- java - 图像加载和上传到 Firebase 存储无法在 android 和 firebase 控制台中显示“错误加载预览”
- c - 用于在 C 中打印 uknown 大小的二维数组的函数
- alexa-skill - 带有 Jovo 框架的 Alexa 语音:这可以通过话语获得 IntentName 吗?如何根据用户话语决定跳转到哪个意图?
- angular - primeng 树,p-tree 默认扩展和选择节点,突出显示不起作用
- angular - 在一个地方导入所有文件时,sass 变量在 Ionic-4 中不起作用
- javascript - 结帐条纹上的空白图片
- apache-kafka - 如何配置 Spring Cloud Stream (Kafka) 应用程序以在 Confluent Cloud 中自动创建主题?
- c# - 如何将一个 web api 控制器方法调用到另一个 web api 项目中?