weekday_switch: Create a Material Switch for a Day of the Week

View source: R/ui-weekday_switch.R

weekday_switchR Documentation

Create a Material Switch for a Day of the Week

Description

'weekday_switch()' creates a switch using materialSwitch() for a given day of the week. It labels the switch on the right side with the full weekday name and lowercases the 3-day abbreviation for the 'inputId'. This is designed to work inside Shiny modules.

Usage

weekday_switch(
  id,
  day = c("sun", "mon", "tue", "wed", "thu", "fri", "sat"),
  value = FALSE
)

Arguments

id

The id of the Shiny module calling this function

day

A day of the week, as a 3-letter abbreviation in title case

value

TRUE or FALSE.

Value

A switch control that can be added to a UI definition.


jesse-smith/schedules documentation built on July 21, 2022, 9:40 a.m.