PageSourceSearch

https://cdn2.futurefund.com/assets/honey/forms/controllers/flatpickr_time_controller-34a9f3f6.js

js futurefund.com collected 2026-09-24 11:52:25 UTC 1,364 bytes, 41 lines download raw bytes

1/**
2 * @class FlatpickrTimeController
3 * @extends FlatpickrController
4 * @description
5 * Adds a date and time picker to an input field using the
6 * {@link https://flatpickr.js.org/|Flatpickr} library.
7 * Displays datetime in a human-readable format (e.g., "January 7, 2025 3:30 PM").
8 * Stores value in ISO format (Y-m-d H:i) for form submission.
9 *
10 * Features:
11 * - Combined date and time selection
12 * - User-friendly display format with AM/PM
13 * - ISO format storage for form submission
14 * - Clear (×) button to reset the value (see {@link FlatpickrController})
15 *
16 * @example <caption>With Rails form builder</caption>
17 * = f.datetime_field :starts_at
18 *
19 * @requires flatpickr
20 */
21import FlatpickrController from "honey/forms/controllers/flatpickr_controller"
22
23export default class FlatpickrTimeController extends FlatpickrController {
24  /**
25   * Date and time Flatpickr options.
26   * - enableTime: true - Enables time selection
27   * - altInput: true - Shows a user-friendly display format
28   * - altFormat: "F j, Y h:i K" - Display format (e.g., "January 7, 2025 3:30 PM")
29   * - dateFormat: "Y-m-d H:i" - Storage format for form submission
30   *
31   * @returns {Object} Flatpickr configuration
32   */
33  get pickerOptions() {
34    return {
35      enableTime: true,
36      altInput: true,
37      altFormat: "F j, Y h:i K",
38      dateFormat: "Y-m-d H:i"
39    }
40  }
41}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.