Date Picker
A date picker component with input.
Usage
Single date
Installation
Components
Component | Built using | Source |
---|
A date picker component with input.
div(class: 'space-y-4 w-[260px]') do Popover(options: { trigger: 'focusin' }) do PopoverTrigger(class: 'w-full') do div(class: 'grid w-full max-w-sm items-center gap-1.5') do label(for: "date") { "Select a date" } Input(type: 'string', placeholder: "Select a date", class: 'rounded-md border shadow', id: 'date', data_controller: 'input') end end PopoverContent do Calendar(input_id: '#date') end end end
Run the install command
rails g ruby_ui:component DatePicker
Component | Built using | Source |
---|