CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-flatpickr

A lightweight, powerful javascript datetime picker

95

1.06x
Overview
Eval results
Files

task.mdevals/scenario-1/

Event Registration Form

Build an event registration form that uses a date picker to allow users to select their preferred event date. The form should initialize with sensible default values to improve user experience.

Requirements

Create a web page with an event registration form that includes:

  1. A single input field for selecting both event date and time
  2. The picker should initialize with tomorrow's date as the default
  3. The picker should initialize with 2:00 PM as the default time
  4. The selected date and time should be displayed in the format: "Month DD, YYYY at HH:MM AM/PM"
  5. When the user clicks the input, a picker interface should appear showing both calendar and time selection

Implementation Details

  • Create an HTML file (index.html) with a form containing an input field
  • Create a JavaScript file (app.js) that initializes the date/time picker with the specified defaults
  • The picker should open when the user clicks on the input field
  • The form should display the default values when the page loads

Test Cases

  • When the page loads, the date input displays tomorrow's date @test
  • When the page loads, the time defaults to 2:00 PM @test
  • When the user clicks the input, a combined date and time picker appears @test
  • The displayed format shows the date and time in a readable format @test

Dependencies { .dependencies }

flatpickr { .dependency }

Provides date and time picker functionality

@satisfied-by

Implementation

@generates

API

/**
 * Initializes the event registration form with a date/time picker
 * configured with default values for tomorrow's date and 2:00 PM.
 */
function initializeEventForm() {
  // Implementation here
}

Install with Tessl CLI

npx tessl i tessl/npm-flatpickr

tile.json