Cally Inputs

Cally Inputs combine a Daisy text input field with a Cally calendar using the new HTML Popover API ↗ for intuitive date selection.

This component provides an elegant alternative to standard HTML date inputs while maintaining a consistent visual style with other form components.

Basic Usage

The basic Cally Input provides a text field that, when clicked, displays a calendar popover for date selection.

Tip

For keyboard navigation, you can use the space or keys to open the calendar popover.

Preview
Code
= daisy_cally_input(value: "2025-07-24")

Custom Input

You can customize the input or calendar by using the appropriate slots.

Preview
Code
= daisy_cally_input(placeholder: "parent placeholder", popover_css: "dropdown-top dropdown-center", auto_scroll_padding: 200) do |c|
  = c.with_input(placeholder: "Select a date...")
  = c.with_calendar(css: "bg-accent")

Rails Form Example

The built-in Form Builder extension makes it easy to use Cally Inputs in your Rails forms. The component automatically extracts the name, ID, and value attributes from the form object.

Preview
Code
= form_with(url: "#", method: :post, scope: :event) do |form|
  .my-2.flex.flex-col.gap-4
    = form.daisy_cally_input(:start_date, start: "Start Date")
    = form.daisy_cally_input(:end_date, end: "End Date")
    = form.daisy_cally_input(:event_date, floating_placeholder: "Select an event date")

    = form.daisy_label(:registration_deadline, "Registration Deadline", css: "mt-4")
    = form.daisy_cally_input(:registration_deadline, value: Date.today.next_month.to_s) do |cally|
      - cally.with_input(placeholder: "Select a registration deadline...")

    = form.daisy_label(:reminder_date, "Reminder Date", css: "mt-4")
    = form.daisy_cally_input(:reminder_date, popover_css: "dropdown-top") do |cally|
      - cally.with_input(placeholder: "Select a reminder date...")
      - cally.with_calendar(css: "bg-secondary")
Made with by Profoundry .
Copyright © 2023-2025 Profoundry LLC.
All rights reserved.