CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-flatpickr

A lightweight, powerful javascript datetime picker

95

1.06x
Quality

Pending

Does it follow best practices?

Impact

95%

1.06x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

criteria.jsonevals/scenario-7/

{
  "context": "This criteria evaluates how effectively the engineer uses flatpickr's onChange event hook to capture and respond to date selection events. The focus is on proper initialization of flatpickr with the onChange callback and correct handling of the callback parameters.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "flatpickr initialization",
      "description": "Properly initializes flatpickr on the input element by calling flatpickr() constructor with the element and configuration object",
      "max_score": 15
    },
    {
      "name": "onChange hook implementation",
      "description": "Implements the onChange callback function in the flatpickr configuration object to capture date selection events",
      "max_score": 30
    },
    {
      "name": "onChange parameters usage",
      "description": "Correctly uses the onChange callback parameters (selectedDates array, dateStr string, and instance object) to access the selected date information",
      "max_score": 25
    },
    {
      "name": "Date formatting",
      "description": "Properly formats the date from the onChange callback into YYYY-MM-DD format, using either the dateStr parameter or formatting the Date object from selectedDates array",
      "max_score": 15
    },
    {
      "name": "Clear functionality integration",
      "description": "Uses flatpickr's clear() method or setDate() method to programmatically clear the selection when the clear button is clicked",
      "max_score": 10
    },
    {
      "name": "Real-time event handling",
      "description": "Ensures the onChange callback executes immediately upon date selection, properly updating the log display without requiring additional user actions",
      "max_score": 5
    }
  ]
}

tile.json