CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-flatpickr

A lightweight, powerful javascript datetime picker

95

1.06x
Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how well the engineer uses flatpickr's global configuration capabilities to set shared defaults across multiple date picker instances. The focus is on proper usage of the setDefaults() method and understanding how global defaults interact with instance-specific configurations.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses setDefaults()",
      "description": "Correctly calls flatpickr.setDefaults() or imports and uses the setDefaults function to establish global configuration that applies to all instances",
      "max_score": 30
    },
    {
      "name": "Global date format",
      "description": "Sets the dateFormat option to 'Y-m-d' in the global defaults configuration",
      "max_score": 10
    },
    {
      "name": "Global time settings",
      "description": "Enables time selection with enableTime: true and sets time_24hr: true in the global defaults",
      "max_score": 15
    },
    {
      "name": "Global week start",
      "description": "Configures the first day of week using the locale option with firstDayOfWeek set to 1 (Monday) in global defaults",
      "max_score": 10
    },
    {
      "name": "Creates date pickers",
      "description": "Creates three flatpickr instances by calling flatpickr() on the appropriate input elements with ids 'start-date', 'end-date', and 'appointment-date'",
      "max_score": 15
    },
    {
      "name": "Instance-level override",
      "description": "Overrides the global dateFormat for the appointment date picker to 'F j, Y' and disables time selection with enableTime: false",
      "max_score": 15
    },
    {
      "name": "Exports API function",
      "description": "Exports the initializeDatePickers function that performs the configuration and initialization",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-flatpickr

tile.json