A lightweight, powerful javascript datetime picker
95
{
"context": "This criteria evaluates how well the engineer uses flatpickr's default date/time configuration capabilities to create an event registration form. The focus is on proper initialization of the picker with default values, enabling time selection, and formatting the display output.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Flatpickr initialization",
"description": "The code properly initializes flatpickr on the input element using the correct API (e.g., flatpickr() constructor or similar)",
"max_score": 15
},
{
"name": "Default date configuration",
"description": "Uses the defaultDate option to set tomorrow's date as the initial value when the picker loads",
"max_score": 20
},
{
"name": "Default time configuration",
"description": "Uses the defaultHour and defaultMinute options (or defaultDate with a specific time) to set 2:00 PM as the initial time",
"max_score": 20
},
{
"name": "Time picker enabled",
"description": "Enables the time picker using the enableTime option to allow users to select both date and time",
"max_score": 15
},
{
"name": "Date format configuration",
"description": "Uses the dateFormat option to configure the display format to match the requirement (e.g., 'F j, Y at h:i K' or equivalent)",
"max_score": 15
},
{
"name": "Time format display",
"description": "Configures the picker to display time in 12-hour format with AM/PM indicator using appropriate options (e.g., time_24hr: false or via dateFormat tokens)",
"max_score": 15
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-flatpickrevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10